/* 
 * Fireside Films - Brand Theme & Stylesheet
 * Dark Theme, Flatstyle, Minimalist, Responsive
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0D141C;
    --bg-sidebar: #090F15;
    --card-bg: #15222E;
    --card-bg-hover: #1C2D3D;
    --card-header-bg: #111B25;

    --primary: #008EAA;
    --primary-dark: #005A70;
    --primary-glow: rgba(0, 142, 170, 0.25);

    --text-main: #F0EEE9;
    --text-muted: #94A3B8;
    --text-dark: #0F172A;

    --accent-orange: #FE5000;
    --accent-rust: #A9431E;
    --accent-green: #10B981;
    --accent-red: #EF4444;

    --border-color: rgba(0, 142, 170, 0.18);
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-focus: #008EAA;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #33b5ce;
}

/* Layout Principal */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

.brand-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.brand-title span {
    color: var(--primary);
}

.sidebar-nav {
    padding: 20px 12px;
    flex: 1;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding: 12px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: var(--transition);
}

.nav-item svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-main);
    background-color: rgba(0, 142, 170, 0.15);
    border-left: 3px solid var(--primary);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-logout {
    color: var(--accent-rust);
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
}

.btn-logout:hover {
    color: var(--accent-orange);
    background-color: rgba(254, 80, 0, 0.1);
}

/* Área de Conteúdo Principal */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-dark);
}

.top-header {
    height: 70px;
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.content-body {
    padding: 30px;
    flex: 1;
}

/* Formulário de Login (index.php) */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #005A70 0%, #0D141C 50%);
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

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

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 8px;
}

/* Grids & Cards */
.grid {
    display: grid;
    gap: 20px;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card-hover:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 18px 20px;
    background-color: var(--card-header-bg);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

/* Métricas Dashboard */
.kpi-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, #1A2B3C 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: rgba(0, 142, 170, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon svg {
    width: 26px;
    height: 26px;
}

.kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.kpi-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estilos de Formulários e Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: #0A1118;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

/* Botões Customizados */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn svg {
    width: 16px;
    height: 16px;
}

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

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.btn-accent {
    background-color: var(--accent-orange);
    color: #ffffff;
}

.btn-accent:hover {
    background-color: var(--accent-rust);
    color: #ffffff;
}

.btn-success {
    background-color: var(--accent-green);
    color: #ffffff;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: var(--accent-red);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* Badges e Status */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge svg {
    width: 12px;
    height: 12px;
}

.badge-approved {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-revision {
    background-color: rgba(254, 80, 0, 0.15);
    color: var(--accent-orange);
    border: 1px solid rgba(254, 80, 0, 0.3);
}

.badge-pending {
    background-color: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-active {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.badge-inactive {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.badge-superadmin {
    background: linear-gradient(135deg, rgba(254, 80, 0, 0.22), rgba(0, 142, 170, 0.22));
    color: #ff9d5c;
    border: 1px solid rgba(254, 80, 0, 0.4);
    box-shadow: 0 0 10px rgba(254, 80, 0, 0.1);
}

.badge-admin {
    background-color: rgba(0, 142, 170, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(0, 142, 170, 0.3);
}

.badge-first-pass {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(16, 185, 129, 0.2));
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.45);
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.15);
}

/* Alertas */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-warning {
    background-color: rgba(254, 80, 0, 0.15);
    border: 1px solid rgba(254, 80, 0, 0.3);
    color: #fdba74;
}

/* Tabelas Customizadas */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    background-color: var(--card-header-bg);
    padding: 14px 18px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-subtle);
}

.table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Media Players e Embed Container */
.embed-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* Aspect Ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background-color: #fff;
}

.embed-responsive iframe,
.embed-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Pasta Card */
.folder-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    cursor: pointer;
}

.folder-card:hover {
    border-color: var(--primary);
    background-color: var(--card-bg-hover);
    transform: translateY(-2px);
}

.folder-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: rgba(0, 142, 170, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-icon.drive {
    background: rgba(254, 80, 0, 0.15);
    color: var(--accent-orange);
}

.folder-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.folder-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Arquivo Card */
.file-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.file-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.file-preview {
    height: 160px;
    background-color: #0A1118;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-icon {
    color: var(--primary);
}

.file-preview-icon svg {
    width: 48px;
    height: 48px;
}

.file-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.3;
}

.file-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
}

/* Timeline de Comentários / Feedbacks */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    background-color: #0A1118;
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border-subtle);
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-date {
    font-size: 11px;
    color: var(--text-muted);
}

.comment-body {
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.5;
}

/* Modais Customizados */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
}

/* Responsividade Mobile */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* Breadcrumbs & Links de Navegação */
.breadcrumb-container a:hover {
    color: var(--primary-light) !important;
    text-decoration: underline;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
}