/* Admin Panel Standard Styles - iEstudei */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-body: #f8f9fa;
    --bg-sidebar: #ffffff;
    --bg-sidebar-header: #ffffff;
    --bg-sidebar-hover: #f2f4f7;
    --text-sidebar: #5f6b75;
    --text-muted: #bdc3c7;
    --text-white: #fff;
    --text-dark: #2c3e50;
    
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --danger-color: #e74c3c;
    --danger-hover: #c0392b;
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    
    --border-color: #e9ecef;
    --border-radius: 10px;
    --border-radius-sm: 6px;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    margin: 0;
    display: flex;
    height: 100vh;
    background-color: var(--bg-body);
    color: var(--text-dark);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    background-color: var(--bg-sidebar);
    text-align: center;
}

.sidebar-logo {
    background: transparent;
    border-radius: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: none;
}
.sidebar-logo img { width: 114px; height: 114px; object-fit: contain; }

.sidebar-nav {
    padding: 1rem 0.5rem;
    flex: 1;
    overflow-y: auto;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 5px;
    color: var(--text-sidebar);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.sidebar a i,
.sidebar a svg {
    width: 24px;
    height: 24px;
    text-align: center;
    margin-right: 12px;
    font-size: 1.1rem;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
}

.sidebar a:hover { background-color: var(--bg-sidebar-hover); color: #495057; transform: translateX(3px); }

.sidebar a.active { background-color: var(--primary-color); color: var(--text-white); box-shadow: 0 2px 5px rgba(13,110,253,0.3); }

/* Content */
.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background-color: var(--bg-body);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.header span {
    font-weight: 500;
    color: #7f8c8d;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius-sm);
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    transition: var(--transition);
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-danger { background-color: var(--danger-color); }
.btn-danger:hover { background-color: var(--danger-hover); }

body { zoom: 0.9; }
.tabela-notas { zoom: 1 !important; }
@supports not (zoom: 1) {
    body { transform: scale(0.9); transform-origin: top left; }
    .tabela-notas { transform: none; }
}

/* Modal base */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.35); }
.modal-content { background-color: #fff; margin: 8% auto; padding: 20px; border: 1px solid #ddd; width: 90%; max-width: 760px; border-radius: var(--border-radius); box-shadow: var(--shadow-md); }
.modal .close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.modal .close:hover { color: #333; }

/* Tabs viewer */
.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tab { padding: 6px 10px; background: #f0f4f8; border-radius: 4px; cursor: pointer; }
.tab.active { background: var(--primary-color); color: #fff; }
.sheet { display: none; }
.sheet.active { display: block; }

.btn-info { background-color: #17a2b8; }
.btn-info:hover { background-color: #138496; }

.btn-success { background-color: var(--success-color); }
.btn-secondary { background-color: #6c757d; color: white; }
.btn-secondary:hover { background-color: #5a6268; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    table-layout: fixed;
}

table th, table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover td {
    background-color: #fbfbfb;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
}
.alert-success { background-color: #d1e7dd; color: #0f5132; border: 1px solid #badbcc; }
.alert-danger { background-color: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }

/* Filter Styles */
.filters-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.filter-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
::-webkit-scrollbar-thumb {
    background: #ccc; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #aaa; 
}
/* User Badge Dropdown */
.user-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.user-name {
    font-weight: 500;
    color: #7f8c8d;
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    min-width: 260px;
    border: 1px solid var(--border-color);
    display: none;
    padding: 10px 12px;
    z-index: 200;
}
.user-badge:hover .user-dropdown {
    display: block;
}
.user-dropdown .item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    border-bottom: 1px solid #f0f0f0;
}
.user-dropdown .item:last-child {
    border-bottom: none;
}

/* Materials */
.materials-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}
.material-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.material-card .top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.material-card .title {
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.25;
    word-break: break-word;
}
.material-card .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
}
.material-card .meta .pill {
    background: #f1f5f9;
    color: #334155;
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 600;
    font-size: 0.8rem;
}
.material-card .desc {
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.4;
    word-break: break-word;
}
.material-card .actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.material-card .actions .btn {
    box-shadow: none;
}
