:root {
    --brand: #0f766e;
    --accent: #f59e0b;
    --ink: #0f172a;
    --muted: #64748b;
    --bg: #f8fafc;
}
* { box-sizing: border-box; }
body {
    font-family: 'Manrope', sans-serif;
    background: radial-gradient(circle at 10% 10%, #ecfeff, #f8fafc 35%), linear-gradient(180deg, #f8fafc, #ffffff 40%);
    color: var(--ink);
}
h1,h2,h3,h4,h5,h6,.brand-text { font-family: 'Space Grotesk', sans-serif; }
.site-header { backdrop-filter: blur(8px); }
.logo { width: 44px; height: 44px; }
.brand-text { font-weight: 700; letter-spacing: .2px; }
.hero {
    background: linear-gradient(135deg, #0f766e 0%, #0ea5e9 55%, #f59e0b 100%);
    color: #fff;
    box-shadow: 0 20px 45px rgba(15, 118, 110, .2);
}
.hero .text-muted { color: rgba(255,255,255,.88) !important; }
.hero-logo { width: 220px; max-width: 100%; filter: drop-shadow(0 10px 20px rgba(0,0,0,.2)); }
.search-bar .form-control { border: 0; }
.section-title { font-weight: 700; margin-bottom: 1rem; }
.step-card, .material-card, .dept-card, .sidebar-card {
    background: #fff;
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .05);
    height: 100%;
}
.step-card i { font-size: 1.35rem; color: var(--brand); }
.dept-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.dept-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
    border-color: #bae6fd;
}
.dept-card p { margin-bottom: 0; }
.material-card a { color: inherit; text-decoration: none; }
.material-card a:hover { color: var(--brand); }
.chip {
    display: inline-block;
    padding: .5rem .9rem;
    background: #ecfeff;
    border: 1px solid #bae6fd;
    color: #0c4a6e;
    border-radius: 999px;
    text-decoration: none;
    font-size: .9rem;
}
.chip:hover { background: #cffafe; }
.site-footer {
    background: #0f172a;
    color: #fff;
}
.site-footer .text-muted {
    color: #b8c3d6 !important;
}
.site-footer a { color: #cbd5e1; text-decoration: none; transition: color .2s ease; }
.site-footer a:hover { color: #fff; }
.site-footer p,
.site-footer li,
.site-footer .footer-meta {
    color: #cbd5e1;
}
.site-footer .footer-meta {
    opacity: .95;
}
.auth-panel {
    max-width: 560px;
    margin: 0 auto;
}
.password-toggle-wrap {
    position: relative;
}
.password-toggle-wrap .form-control,
.password-toggle-wrap .form-select {
    padding-right: 2.75rem;
}
.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: .75rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 0;
    line-height: 1;
    z-index: 3;
}
.password-toggle-btn:hover,
.password-toggle-btn:focus {
    color: var(--brand);
}
.table-search-input {
    max-width: 320px;
}
.table-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.table-controls-top {
    margin-bottom: .75rem;
}
.table-controls-group {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.table-page-size {
    width: auto;
    min-width: 90px;
}
.table-pagination {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.table-pagination .btn.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.social-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
}
.btn-whatsapp { background: #22c55e; color: white; }
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, .65);
    z-index: 1052;
    display: none;
}
.mobile-overlay.open { display: block; }
.mobile-sheet {
    background: #fff;
    position: absolute;
    right: 0;
    top: 0;
    width: min(92vw, 360px);
    height: 100%;
    padding: 1rem;
    overflow-y: auto;
    box-shadow: -15px 0 25px rgba(2, 6, 23, .2);
}
.mobile-sheet a { text-decoration: none; color: var(--ink); display: inline-block; padding: .3rem 0; }
.mobile-depts .badge { border: 1px solid #cbd5e1; margin: .2rem; color: #334155; background: #fff; }
.preview-block {
    user-select: none;
    -webkit-user-select: none;
    background: #fff7ed;
    border: 1px dashed #f59e0b;
    border-radius: 12px;
    padding: 1rem;
}
.back-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    background: var(--brand);
    color: #fff;
    border: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    z-index: 1030;
    display: none;
}
.back-top.show { display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 991px) {
    .navbar-collapse { display: none !important; }
    .auth-panel { max-width: 100%; }
    .table-controls-top {
        display: flex;
        justify-content: flex-end;
    }
    .table-controls-top .table-top-group,
    .table-controls-top .table-top-pagination {
        display: none;
    }
    .table-controls-group,
    .table-pagination {
        width: 100%;
        justify-content: space-between;
    }
    .table-search-input,
    .table-page-size {
        width: 100%;
        max-width: none;
    }
}
@media (min-width: 992px) {
    .table-controls-top {
        display: grid;
        grid-template-columns: auto auto minmax(260px, 320px);
        align-items: center;
        gap: 1rem;
    }
    .table-controls-top .table-controls-group {
        width: auto;
        justify-content: flex-start;
    }
    .table-controls-top .table-pagination {
        width: auto;
        justify-content: center;
    }
    .table-controls-top .table-search-input {
        width: 100%;
        max-width: 320px;
        justify-self: end;
    }
}
