/* 
 * RBI TV - Estilo do Painel Administrativo
 */

:root {
    --primary: #0056b3;
    --primary-dark: #004494;
    --secondary: #ff5722;
    --secondary-dark: #e64a19;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f5f5;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: var(--primary);
    background-color: rgba(0, 86, 179, 0.05);
    border-left: 3px solid var(--primary-dark);
}

.sidebar .nav-link.active {
    color: var(--primary);
    background-color: rgba(0, 86, 179, 0.1);
    border-left: 3px solid var(--primary);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    color: var(--gray);
}

.sidebar .nav-link:hover i,
.sidebar .nav-link.active i {
    color: var(--primary);
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Main content */
main {
    padding-top: 1.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.card-title {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Botões */
.btn {
    border-radius: 5px;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

/* Tabelas */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-top: none;
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 86, 179, 0.03);
}

/* Formulários */
.form-control {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Imagem Preview */
.img-preview-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.img-preview {
    width: 100%;
    height: auto;
    display: block;
}

.img-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-preview-container:hover .img-preview-overlay {
    opacity: 1;
}

.img-preview-actions {
    display: flex;
    gap: 10px;
}

.img-preview-actions .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Cropper */
.cropper-container {
    margin-bottom: 20px;
}

.cropper-preview {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Login */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    position: relative;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 60px;
}

/* Botão de voltar na página de login */
.login-card .btn-outline-secondary {
    transition: all 0.3s ease;
}

.login-card .btn-outline-secondary:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Utilitários */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsividade */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
        padding-top: 15px;
        padding-bottom: 15px;
    }
    
    main {
        padding-top: 1rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Programa Cards */
.programa-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.programa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.programa-image {
    position: relative;
    overflow: hidden;
    height: 0;
    padding-top: 75%; /* Proporção 4:3 */
}

.programa-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.programa-card:hover .programa-image img {
    transform: scale(1.05);
}

.programa-details {
    padding: 1.2rem;
    background-color: #fff;
}

.programa-day {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.programa-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
    line-height: 1.4;
}

.programa-time {
    font-size: 0.9rem;
    color: var(--gray);
    display: flex;
    align-items: center;
}

.programa-time i {
    margin-right: 0.5rem;
}

.programa-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.programa-card:hover .programa-actions {
    opacity: 1;
}

.programa-actions .btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.programa-actions .btn:hover {
    background-color: #fff;
    transform: translateY(-2px);
}

.programa-actions .btn-edit:hover {
    color: var(--primary);
}

.programa-actions .btn-delete:hover {
    color: var(--danger);
}

.programa-actions .btn-crop:hover {
    color: var(--success);
}

/* Developer Credit */
.admin-dev-credit {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 11px;
    opacity: 0.6;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 5px 10px;
    border-radius: 4px;
    z-index: 1000;
}

.admin-dev-credit a {
    color: var(--primary);
    text-decoration: none;
}

.admin-dev-credit a:hover {
    text-decoration: underline;
    opacity: 1;
}

@media (max-width: 767.98px) {
    .admin-dev-credit {
        bottom: 5px;
        right: 5px;
        font-size: 10px;
    }
} 