/* ============================================================
   UniVibes — App CSS
   ============================================================ */

/* --- CSS Variables --- */
:root {
    --navy: #0C447C;
    --blue: #185FA5;
    --blue-light: #E6F1FB;
    --green: #1D9E75;
    --text: #212529;
    --gray: #6C757D;
    --white: #ffffff;
    --bg: #f4f6f9;
    --border: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --transition: 0.2s ease;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --sidebar-width: 260px;
    --navbar-height: 60px;

    /* Semantic colors */
    --danger: #dc3545;
    --danger-bg: #f8d7da;
    --danger-border: #f5c6cb;
    --success: #1D9E75;
    --success-bg: #d4edda;
    --success-border: #c3e6cb;
    --warning: #ffc107;
    --warning-bg: #fff3cd;
    --warning-border: #ffeeba;
    --info: #17a2b8;
    --info-bg: #E6F1FB;
    --info-border: #b8daff;
}

/* --- Reset / Normalize --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

a:hover {
    color: var(--navy);
    text-decoration: underline;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.5em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

/* --- Layout Utilities --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--gray); }
.text-small  { font-size: 0.875rem; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden { display: none !important; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- Logo --- */
.logo-text {
    font-size: 1.5rem;
    color: var(--navy);
    font-weight: 400;
    letter-spacing: -0.5px;
}

.logo-text strong {
    color: var(--green);
    font-weight: 700;
}

/* --- Navbar --- */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-height);
}

.navbar-brand {
    text-decoration: none;
}

.navbar-brand:hover {
    text-decoration: none;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.navbar-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--gray);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
    background: var(--blue-light);
    text-decoration: none;
}

/* --- User Dropdown --- */
.navbar-user {
    margin-left: 0.5rem;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}

.user-dropdown-toggle:hover {
    border-color: var(--blue);
}

.user-avatar-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue-light);
    color: var(--blue);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.user-name {
    font-size: 0.875rem;
    color: var(--text);
    font-weight: 500;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1050;
    padding: 0.5rem 0;
}

.user-dropdown-menu.open {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    color: var(--text);
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition);
    font-family: var(--font);
}

.dropdown-item:hover {
    background: var(--bg);
    text-decoration: none;
}

.dropdown-item-danger {
    color: var(--danger);
}

.dropdown-item-danger:hover {
    background: #fef2f2;
}

.dropdown-divider {
    margin: 0.25rem 0;
    border-color: var(--border);
}

/* --- Alerts --- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    position: relative;
    border: 1px solid transparent;
    transition: opacity 0.4s ease;
}

.alert-success {
    background: var(--success-bg);
    color: #155724;
    border-color: var(--success-border);
}

.alert-error {
    background: var(--danger-bg);
    color: #721c24;
    border-color: var(--danger-border);
}

.alert-warning {
    background: var(--warning-bg);
    color: #856404;
    border-color: var(--warning-border);
}

.alert-info {
    background: var(--info-bg);
    color: #004085;
    border-color: var(--info-border);
}

.alert-list {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
    list-style: disc;
}

.alert-list li {
    list-style: disc;
    margin-bottom: 0.25rem;
}

.alert.fade-out {
    opacity: 0;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.5;
    font-family: var(--font);
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

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

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

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

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

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

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    color: var(--white);
}

.btn-success {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
}

.btn-success:hover {
    background: #178c66;
    border-color: #178c66;
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--blue-light);
    border-color: var(--blue);
    color: var(--blue);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--blue);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
    font-family: var(--font);
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--navy);
}

.btn-group {
    display: inline-flex;
    gap: 0.5rem;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: var(--font);
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.15);
}

.form-control::placeholder {
    color: #adb5bd;
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.invalid-feedback {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-control-file {
    display: block;
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--gray);
}

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

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236C757D' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--gray);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group-half {
    flex: 1;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    cursor: pointer;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--blue);
    cursor: pointer;
}

.form-fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-fieldset legend {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    padding: 0 0.5rem;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.form-inline {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-inline .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 150px;
}

.inline-form {
    display: inline;
}

.input-password-wrapper {
    position: relative;
}

.input-password-wrapper .form-control {
    padding-right: 3rem;
}

.btn-toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    padding: 4px;
    font-size: 0.875rem;
    transition: color var(--transition);
}

.btn-toggle-password:hover {
    color: var(--text);
}

.icon-eye::before {
    content: '\25C9';
}

.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.5rem;
    background: var(--border);
    overflow: hidden;
}

.password-strength .strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

/* OTP inputs */
.otp-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
    font-family: var(--font);
    color: var(--text);
}

.otp-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.15);
}

/* --- Cards --- */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    background: #fafbfc;
}

.card-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.card-link {
    display: block;
    text-decoration: none;
    transition: box-shadow var(--transition), transform var(--transition);
}

.card-link:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    text-decoration: none;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* --- Tables --- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    vertical-align: middle;
}

.table th {
    background: var(--blue-light);
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: var(--blue-light);
}

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

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
    line-height: 1.4;
}

.badge-primary {
    background: var(--blue-light);
    color: var(--blue);
}

.badge-success {
    background: var(--success-bg);
    color: #155724;
}

.badge-danger {
    background: var(--danger-bg);
    color: #721c24;
}

.badge-warning {
    background: var(--warning-bg);
    color: #856404;
}

.badge-sm {
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
}

/* --- Stats / KPI --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--blue);
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--gray);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-icon {
    font-size: 2rem;
    line-height: 1;
}

.kpi-icon-users { color: var(--blue); }
.kpi-icon-active { color: var(--green); }
.kpi-icon-pending { color: var(--warning); }
.kpi-icon-structures { color: var(--navy); }
.kpi-icon-moderation { color: var(--danger); }
.kpi-icon-events { color: var(--info); }

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

.kpi-label {
    font-size: 0.8125rem;
    color: var(--gray);
}

/* --- Dashboard --- */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.dashboard-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.125rem;
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--blue-light);
}

/* Feed cards */
.feed-card {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.feed-card:last-child {
    border-bottom: none;
}

.feed-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.feed-card-body p {
    margin: 0;
}

/* Event list */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.event-item:last-child {
    border-bottom: none;
}

.event-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blue);
    white-space: nowrap;
    background: var(--blue-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.event-title {
    font-size: 0.875rem;
    color: var(--text);
}

/* --- Profile --- */
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.profile-avatar {
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--blue-light);
}

.profile-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--blue-light);
    color: var(--blue);
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.profile-bio {
    color: var(--gray);
    margin-top: 0.5rem;
}

.profile-details {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.detail-item dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    margin-bottom: 0.125rem;
}

.detail-item dd {
    font-size: 0.9375rem;
    color: var(--text);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--blue-light);
    color: var(--blue);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
}

.tag:hover {
    background: var(--blue);
    color: var(--white);
    text-decoration: none;
}

/* --- Structures Tree --- */
.tree-list {
    padding-left: 1.25rem;
}

.tree-list .tree-list {
    margin-top: 0.25rem;
}

.tree-item {
    padding: 0.25rem 0;
}

.tree-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all var(--transition);
}

.tree-link:hover {
    background: var(--blue-light);
    text-decoration: none;
}

.tree-icon {
    font-size: 0.625rem;
    color: var(--gray);
}

.tree-depth-0 > .tree-link {
    font-weight: 600;
    font-size: 1rem;
}

/* --- Breadcrumb --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--gray);
}

.breadcrumb a:hover {
    color: var(--blue);
}

.breadcrumb-sep {
    color: var(--border);
}

/* --- Page Header --- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.pagination-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--transition);
}

.pagination-link:hover {
    background: var(--blue-light);
    border-color: var(--blue);
    text-decoration: none;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--gray);
}

/* --- Table Filters --- */
.table-filters {
    margin-bottom: 1.5rem;
}

.filter-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-form .form-control {
    flex: 1;
    min-width: 160px;
}

.filter-form .btn {
    flex-shrink: 0;
}

/* --- Moderation --- */
.moderation-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.moderation-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.moderation-card-body {
    padding: 1.25rem;
}

.moderation-card-body p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.moderation-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

/* --- Admin Layout --- */
.admin-body {
    background: var(--bg);
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - var(--navbar-height));
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--navy);
    color: var(--white);
    flex-shrink: 0;
    padding: 1.5rem 0;
    position: sticky;
    top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
}

.admin-nav-title {
    padding: 0 1.25rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.admin-nav-list {
    display: flex;
    flex-direction: column;
}

.admin-nav-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
    border-left-color: var(--blue-light);
}

.admin-main {
    flex: 1;
    overflow-x: auto;
    min-width: 0;
}

.admin-content {
    padding: 2rem;
    max-width: 1200px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.admin-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* --- Verify Identity --- */
.verify-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.verify-option-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.verify-option-title {
    font-size: 1.125rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.verify-option-desc {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.verify-option-divider {
    text-align: center;
    color: var(--gray);
    font-size: 0.875rem;
    position: relative;
}

.verify-option-divider::before,
.verify-option-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}

.verify-option-divider::before { left: 0; }
.verify-option-divider::after { right: 0; }

/* --- 2FA Setup --- */
.twofa-setup {
    text-align: center;
}

.twofa-qr {
    margin: 1.5rem 0;
}

.twofa-qr-img {
    display: inline-block;
    max-width: 200px;
    border: 4px solid var(--white);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.twofa-secret {
    display: inline-block;
    background: var(--bg);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    color: var(--navy);
    word-break: break-all;
    margin-bottom: 1.5rem;
}

.twofa-manual {
    margin-bottom: 1.5rem;
}

/* --- Empty state --- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    max-width: 400px;
    margin: 0 auto;
}

/* --- Error pages --- */
.error-code {
    font-size: 5rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 { margin: 0; }

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    line-height: 1;
}

.modal-body { padding: 1.25rem; }

.modal-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* --- Loading Spinner --- */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Tabs --- */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.tabs a {
    padding: 0.75rem 1.25rem;
    color: var(--gray);
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}

.tabs a:hover {
    color: var(--blue);
    text-decoration: none;
}

.tabs a.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

/* --- Footer --- */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-inner {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray);
}

.footer-inner p {
    margin: 0;
}

/* ============================================================
   Responsive (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
    h1 { font-size: 1.375rem; }
    h2 { font-size: 1.125rem; }

    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }

    .navbar-menu.open {
        display: flex;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        padding: 0.75rem 1rem;
    }

    .navbar-user {
        margin-left: 0;
        width: 100%;
        border-top: 1px solid var(--border);
        padding-top: 0.75rem;
    }

    .user-dropdown-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .user-dropdown-menu {
        position: static;
        box-shadow: none;
        border: 1px solid var(--border);
        margin-top: 0.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .page-header {
        flex-direction: column;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-form .form-control {
        min-width: unset;
    }

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

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 0.5rem 0;
    }

    .admin-nav-list {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 1rem;
        gap: 0.25rem;
    }

    .admin-nav-link {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        border-radius: var(--radius-sm);
        border-left: none;
        font-size: 0.8rem;
    }

    .admin-nav-link.active {
        border-left-color: transparent;
    }

    .admin-nav-title {
        display: none;
    }

    .admin-content {
        padding: 1rem;
    }

    .otp-input {
        width: 40px;
        height: 48px;
        font-size: 1.25rem;
    }

    .detail-list {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .moderation-card-actions {
        flex-wrap: wrap;
    }

    .form-actions {
        flex-wrap: wrap;
    }

    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }

    .profile-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .otp-inputs {
        gap: 0.25rem;
    }

    .otp-input {
        width: 36px;
        height: 44px;
        font-size: 1.125rem;
    }
}
