/* =====================================================
   ระบบจัดการการประชุมออนไลน์ — OBEC-Style Theme
   Sidebar Layout + Blue/White Professional Design
   ===================================================== */

/* ─── Google Font Import ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

/* ─── CSS Variables ───────────────────────────────── */
:root {
    --bg-primary: #f0f4f8;
    --bg-white: #ffffff;
    --bg-sidebar: #1e3a5f;
    --bg-sidebar-dark: #162d4a;
    --bg-sidebar-hover: rgba(255, 255, 255, 0.1);
    --bg-sidebar-active: rgba(255, 255, 255, 0.15);
    --bg-header: #ffffff;

    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-white: #ffffff;
    --text-sidebar: rgba(255, 255, 255, 0.85);
    --text-sidebar-muted: rgba(255, 255, 255, 0.5);

    --accent-blue: #2b6cb0;
    --accent-blue-light: #3182ce;
    --accent-blue-bg: #ebf4ff;
    --accent-blue-border: #bee3f8;
    --accent-green: #38a169;
    --accent-green-bg: #f0fff4;
    --accent-amber: #d69e2e;
    --accent-amber-bg: #fffff0;
    --accent-red: #e53e3e;
    --accent-red-bg: #fff5f5;
    --accent-purple: #805ad5;
    --accent-cyan: #0987a0;

    --border-color: #e2e8f0;
    --border-light: #edf2f7;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --sidebar-width: 260px;
    --header-height: 60px;

    --transition: all 0.2s ease;
    --transition-fast: all 0.15s ease;
}

/* ─── Dark Mode Overrides ────────────────────────── */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-white: #1e293b;
    --bg-sidebar: #0f172a;
    --bg-sidebar-dark: #000000;
    --bg-header: #1e293b;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border-color: #334155;
    --border-light: #1e293b;

    --accent-blue-bg: #1e3a8a;
    --accent-blue-border: #1e40af;
    --accent-green-bg: #064e3b;
    --accent-amber-bg: #78350f;
    --accent-red-bg: #7f1d1d;

    box-shadow: none;
    /* Reduce shadows in dark mode */
}


/* ─── Reset & Base ───────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Prompt', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-blue-light);
    text-decoration: underline;
}

/* ─── Layout: Sidebar + Content ──────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand .brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3182ce, #63b3ed);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    line-height: 1.3;
}

.sidebar-brand .brand-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-white);
}

.sidebar-brand .brand-subtitle {
    font-size: 0.7rem;
    color: var(--text-sidebar-muted);
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 16px 0;
    flex: 1;
}

.sidebar-nav .nav-section {
    padding: 0 16px;
    margin-bottom: 8px;
}

.sidebar-nav .nav-section-title {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-sidebar-muted);
    padding: 8px 12px 4px;
}

.sidebar-nav .nav-item {
    list-style: none;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 2px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-sidebar);
    font-size: 0.88rem;
    font-weight: 400;
    transition: var(--transition);
    text-decoration: none;
}

.sidebar-nav .nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-white);
    text-decoration: none;
}

.sidebar-nav .nav-link.active {
    background: var(--bg-sidebar-active);
    color: var(--text-white);
    font-weight: 500;
    border-left: 3px solid #63b3ed;
    margin-left: 13px;
}

.sidebar-nav .nav-link .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-nav .nav-link .nav-badge {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Sidebar sub-items */
.sidebar-nav .nav-sub {
    padding-left: 16px;
}

.sidebar-nav .nav-sub .nav-link {
    font-size: 0.82rem;
    padding: 7px 12px 7px 24px;
    position: relative;
}

.sidebar-nav .nav-sub .nav-link::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-sidebar-muted);
    transform: translateY(-50%);
}

.sidebar-nav .nav-sub .nav-link.active::before {
    background: #63b3ed;
}

/* Sidebar user section */
.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3182ce, #805ad5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.sidebar-user .user-details {
    flex: 1;
    min-width: 0;
}

.sidebar-user .user-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 0.68rem;
    color: var(--text-sidebar-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-user .logout-btn {
    color: var(--text-sidebar-muted);
    font-size: 1.1rem;
    transition: var(--transition-fast);
    text-decoration: none;
}

.sidebar-user .logout-btn:hover {
    color: var(--accent-red);
}

/* ─── Main Content Area ──────────────────────────── */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top header bar */
.top-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.top-header .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.top-header .breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.top-header .breadcrumb a:hover {
    color: var(--accent-blue);
}

.top-header .breadcrumb .separator {
    color: var(--border-color);
}

.top-header .breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

.top-header .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Main content */
.main-content {
    padding: 24px 32px;
    flex: 1;
}

.container {
    max-width: 100%;
}

/* ─── Page Header ─────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.page-header p {
    color: var(--text-muted);
    margin-top: 2px;
    font-size: 0.85rem;
}

/* ─── Cards ───────────────────────────────────────── */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    background: #fafbfc;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-header h2,
.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

/* ─── Stats Cards ─────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.blue::before {
    background: linear-gradient(90deg, #3182ce, #63b3ed);
}

.stat-card.green::before {
    background: linear-gradient(90deg, #38a169, #68d391);
}

.stat-card.amber::before {
    background: linear-gradient(90deg, #d69e2e, #ecc94b);
}

.stat-card.rose::before {
    background: linear-gradient(90deg, #e53e3e, #fc8181);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card.blue .stat-icon {
    background: var(--accent-blue-bg);
}

.stat-card.green .stat-icon {
    background: var(--accent-green-bg);
}

.stat-card.amber .stat-icon {
    background: var(--accent-amber-bg);
}

.stat-card.rose .stat-icon {
    background: var(--accent-red-bg);
}

.stat-info h3 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
}

.stat-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─── Meeting Info Header (OBEC Style) ────────────── */
.meeting-header-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.meeting-title-bar {
    background: linear-gradient(135deg, #1e3a5f, #2b6cb0);
    color: white;
    padding: 20px 28px;
    text-align: center;
}

.meeting-title-bar h1 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.meeting-title-bar .meeting-meta {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.6;
}

.meeting-title-bar .meeting-meta span {
    display: inline-block;
    margin: 0 4px;
}

/* Step Progress Bar */
.step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
    gap: 0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: var(--transition);
}

.step-item.active .step-circle {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(43, 108, 176, 0.4);
}

.step-item.completed .step-circle {
    background: var(--accent-green);
    color: white;
}

.step-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: 6px;
    margin-right: 12px;
    white-space: nowrap;
}

.step-item.active .step-label {
    color: var(--accent-blue);
    font-weight: 500;
}

.step-item.completed .step-label {
    color: var(--accent-green);
}

.step-line {
    width: 40px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 4px;
}

.step-item.completed+.step-item .step-line,
.step-item.completed .step-line {
    background: var(--accent-green);
}

/* Conference Button */
.conference-btn-wrapper {
    padding: 16px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.btn-conference {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    background: #1a365d;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Prompt', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-conference:hover {
    background: #2a4a7f;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ─── Collapsible Sections (Agenda) ───────────────── */
.section-collapse {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    background: var(--bg-white);
    overflow: hidden;
}

.section-collapse-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
}

.section-collapse-header:hover {
    background: #f1f5f9;
}

.section-collapse-header .collapse-icon {
    font-size: 0.75rem;
    color: var(--accent-blue);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.section-collapse-header.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.section-collapse-header .section-title {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--accent-blue);
    flex: 1;
}

.section-collapse-header .section-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #edf2f7;
    padding: 2px 10px;
    border-radius: 10px;
}

.section-collapse-body {
    padding: 20px;
    transition: max-height 0.3s ease;
}

.section-collapse-body.collapsed {
    display: none;
}

/* ─── Table ───────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background: #f8fafc;
}

/* ─── Buttons ─────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-blue-light);
    color: white;
}

.btn-success {
    background: var(--accent-green);
    color: white;
}

.btn-success:hover {
    color: white;
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger:hover {
    color: white;
}

.btn-warning {
    background: var(--accent-amber);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: var(--accent-blue-bg);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.78rem;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 0.95rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ─── Badge ───────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-draft {
    background: #edf2f7;
    color: #718096;
}

.badge-scheduled {
    background: var(--accent-blue-bg);
    color: var(--accent-blue);
}

.badge-completed {
    background: var(--accent-green-bg);
    color: var(--accent-green);
}

.badge-cancelled {
    background: var(--accent-red-bg);
    color: var(--accent-red);
}

.badge-invited {
    background: var(--accent-amber-bg);
    color: var(--accent-amber);
}

.badge-confirmed {
    background: var(--accent-green-bg);
    color: var(--accent-green);
}

.badge-attended {
    background: var(--accent-blue-bg);
    color: var(--accent-blue);
}

.badge-absent {
    background: var(--accent-red-bg);
    color: var(--accent-red);
}

.badge-super_admin {
    background: #f3e8ff;
    color: var(--accent-purple);
}

.badge-group_admin {
    background: #e6fffa;
    color: var(--accent-cyan);
}

.badge-member {
    background: #edf2f7;
    color: #718096;
}

.badge-school_admin {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-primary {
    background: var(--accent-blue-bg);
    color: var(--accent-blue);
}

.badge-success {
    background: var(--accent-green-bg);
    color: var(--accent-green);
}

.badge-danger {
    background: var(--accent-red-bg);
    color: var(--accent-red);
}

.badge-secondary {
    background: #edf2f7;
    color: #718096;
}

/* ─── Forms ───────────────────────────────────────── */

/* Form inside card — add inner padding */
.card>form {
    padding: 28px 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group label .required {
    color: var(--accent-red);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Prompt', sans-serif;
    font-size: 0.88rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23718096' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.7;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 4px;
}

.form-row .form-group {
    margin-bottom: 16px;
}

/* Form action buttons */
.card>form .d-flex.mt-3,
.form-actions {
    padding-top: 20px;
    margin-top: 8px;
    border-top: 1px solid var(--border-light);
}

/* ─── Alerts ──────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.88rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: var(--accent-green-bg);
    border: 1px solid #c6f6d5;
    color: #276749;
}

.alert-danger {
    background: var(--accent-red-bg);
    border: 1px solid #fed7d7;
    color: #9b2c2c;
}

.alert-warning {
    background: var(--accent-amber-bg);
    border: 1px solid #fefcbf;
    color: #975a16;
}

.alert-info {
    background: var(--accent-blue-bg);
    border: 1px solid var(--accent-blue-border);
    color: #2a4365;
}

/* ─── Login Page ──────────────────────────────────── */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2b6cb0 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.5s ease;
}

.login-card .logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-card .logo .logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e3a5f, #3182ce);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: white;
}

.login-card .logo h1 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.login-card .logo p {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 4px;
}

.login-card .form-group {
    position: relative;
}

.login-card .form-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-card .form-control {
    padding: 12px 14px 12px 40px;
}

.login-card .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    justify-content: center;
    margin-top: 8px;
    background: linear-gradient(135deg, #1e3a5f, #2b6cb0);
}

.login-card .btn-primary:hover {
    background: linear-gradient(135deg, #2b4c6f, #3182ce);
}

/* ─── Meeting Detail Grid ─────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.detail-item {
    margin-bottom: 14px;
}

.detail-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.detail-item .value {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* ─── Document List ───────────────────────────────── */
.doc-list {
    list-style: none;
}

.doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    transition: var(--transition-fast);
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}

.doc-item:last-child {
    border-bottom: none;
}

.doc-item:hover {
    background: #f8fafc;
}

.doc-item .doc-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.doc-item .doc-icon {
    width: 38px;
    height: 38px;
    background: var(--accent-red-bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red);
    font-size: 1rem;
    flex-shrink: 0;
}

.doc-item .doc-name {
    font-size: 0.85rem;
    color: var(--accent-blue);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-item .doc-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ─── Participant List ────────────────────────────── */
.participant-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    border-bottom: 1px solid var(--border-light);
}

.participant-item:last-child {
    border-bottom: none;
}

.participant-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.participant-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3182ce, #805ad5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

/* ─── Modal ───────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* ─── OBEC Modal (Admin Pages) ────────────────────── */
.obec-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.obec-modal.show {
    display: flex;
}

.obec-modal-content {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.obec-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.obec-modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.obec-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
}

.obec-modal-close:hover {
    color: var(--text-primary);
}

.obec-modal-body {
    padding: 20px;
}

/* ─── Empty State ─────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 0.85rem;
}

/* ─── Footer ──────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    background: var(--bg-white);
}

/* ─── Animations ──────────────────────────────────── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-content {
        padding: 16px;
    }

    .top-header {
        padding: 0 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .card>form {
        padding: 20px 16px;
    }

    .step-progress {
        flex-wrap: wrap;
        gap: 8px;
    }

    .step-label {
        display: none;
    }

    .step-line {
        width: 20px;
    }

    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 1.2rem;
        cursor: pointer;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* ─── Utilities ───────────────────────────────────── */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-danger {
    color: var(--accent-red);
}

.text-success {
    color: var(--accent-green);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.gap-2 {
    gap: 16px;
}

.flex-1 {
    flex: 1;
}

/* ─── Secure Document Viewer ──────────────────────── */
.secure-viewer {
    user-select: none;
    -webkit-user-select: none;
}

.secure-viewer iframe {
    width: 100%;
    height: calc(100vh - 160px);
    border: none;
    border-radius: var(--radius-md);
}

/* ─── Comment Section (OBEC Style) ────────────────── */
.comment-section {
    margin-top: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item .comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-blue-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-item .comment-body {
    flex: 1;
}

.comment-item .comment-author {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
}

.comment-item .comment-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.comment-item .comment-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}