/* =============================================
   Ekson BoardRoom - Custom Theme
   Banking aesthetic: dark blue + gold
   ============================================= */

:root {
    --primary: #0a1628;
    --primary-light: #132040;
    --secondary: #c8a951;
    --secondary-light: #e0c573;
    --accent: #1a3a5c;
    --text-light: #e8e8e8;
    --text-muted: #8a9bb5;
    --sidebar-width: 260px;
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --border-color: #dee2e6;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 100%;
    max-width: 440px;
}

.login-header {
    background: var(--primary);
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
}

.login-header .logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.login-header .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-body {
    padding: 2rem;
}

.login-body .form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
}

.login-body .form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.2rem rgba(200, 169, 81, 0.25);
}

.login-body .btn-login {
    background: var(--secondary);
    color: var(--primary);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s;
}

.login-body .btn-login:hover {
    background: var(--secondary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 169, 81, 0.4);
}

/* =============================================
   LAYOUT - SIDEBAR
   ============================================= */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: var(--text-light);
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s;
}

[dir="rtl"] .sidebar {
    right: 0;
}

[dir="ltr"] .sidebar {
    left: 0;
}

.sidebar-brand {
    padding: 1.25rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand .brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
}

.sidebar-brand .brand-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-nav {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-nav .nav-item {
    margin: 2px 8px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
}

.sidebar-nav .nav-link.active {
    background: var(--secondary);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-section {
    padding: 0.75rem 1.25rem 0.25rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* =============================================
   LAYOUT - MAIN CONTENT
   ============================================= */
.main-content {
    flex: 1;
    background: var(--bg-body);
    min-height: 100vh;
}

[dir="ltr"] .main-content {
    margin-left: var(--sidebar-width);
}

[dir="rtl"] .main-content {
    margin-right: var(--sidebar-width);
}

/* Top Navbar */
.top-navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.top-navbar .page-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}

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

.btn-lang-switch {
    background: var(--primary-light);
    color: var(--secondary);
    border: 1px solid var(--secondary);
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.notification-bell {
    position: relative;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
}

.notification-bell .badge {
    position: absolute;
    top: -5px;
    right: -8px;
    font-size: 0.65rem;
}

[dir="rtl"] .notification-bell .badge {
    right: auto;
    left: -8px;
}

.user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.user-dropdown .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Page Content */
.page-content {
    padding: 1.5rem;
}

/* =============================================
   CARDS & COMPONENTS
   ============================================= */
.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.card-board {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-board .card-header {
    background: var(--primary);
    color: var(--text-light);
    padding: 1rem 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-board .card-header .btn {
    font-size: 0.8rem;
}

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

/* =============================================
   BUTTONS
   ============================================= */
.btn-gold {
    background: var(--secondary);
    color: var(--primary);
    border: none;
    font-weight: 600;
}

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

.btn-navy {
    background: var(--primary);
    color: var(--text-light);
    border: none;
}

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

/* =============================================
   TABLES
   ============================================= */
.table-board {
    margin-bottom: 0;
}

.table-board thead th {
    background: var(--primary);
    color: var(--text-light);
    border: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table-board tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

.table-board tbody tr:hover {
    background: rgba(200, 169, 81, 0.05);
}

/* =============================================
   MEETING CARD
   ============================================= */
.meeting-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.meeting-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.meeting-card .meeting-date {
    background: var(--primary);
    color: var(--secondary);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    min-width: 60px;
}

.meeting-card .meeting-date .day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.meeting-card .meeting-date .month {
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* =============================================
   AGENDA ITEM
   ============================================= */
.agenda-item {
    border-left: 3px solid var(--secondary);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(200, 169, 81, 0.05);
    border-radius: 0 8px 8px 0;
}

[dir="rtl"] .agenda-item {
    border-left: none;
    border-right: 3px solid var(--secondary);
    border-radius: 8px 0 0 8px;
}

/* =============================================
   VOTING
   ============================================= */
.vote-option {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.vote-option:hover {
    border-color: var(--secondary);
    background: rgba(200, 169, 81, 0.05);
}

.vote-option.selected {
    border-color: var(--secondary);
    background: rgba(200, 169, 81, 0.1);
}

.vote-bar {
    height: 28px;
    background: var(--bg-body);
    border-radius: 14px;
    overflow: hidden;
}

.vote-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
    border-radius: 14px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    min-width: fit-content;
}

/* =============================================
   TASK BOARD
   ============================================= */
.task-card {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.task-card:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.task-card .task-priority {
    width: 4px;
    border-radius: 2px;
    min-height: 100%;
}

.priority-low { background: var(--success); }
.priority-medium { background: var(--warning); }
.priority-high { background: #fd7e14; }
.priority-urgent { background: var(--danger); }

/* =============================================
   SIGNATURE PAD
   ============================================= */
.signature-pad-container {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.signature-pad-container canvas {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: crosshair;
    background: #fff;
}

/* =============================================
   AI FEATURES
   ============================================= */
.ai-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--text-light);
    border-radius: 12px;
    padding: 1.5rem;
}

.ai-card .ai-icon {
    font-size: 2.5rem;
    color: var(--secondary);
}

.ai-result {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    max-height: 400px;
    overflow-y: auto;
}

.ai-loading {
    text-align: center;
    padding: 2rem;
}

.ai-loading .spinner-border {
    color: var(--secondary);
    width: 3rem;
    height: 3rem;
}

/* =============================================
   NOTIFICATIONS DROPDOWN
   ============================================= */
.notification-dropdown {
    width: 340px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.notification-item:hover {
    background: rgba(200, 169, 81, 0.05);
}

.notification-item.unread {
    background: rgba(200, 169, 81, 0.08);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    [dir="rtl"] .sidebar {
        transform: translateX(100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* =============================================
   MISC
   ============================================= */
.bg-orange { background-color: #fd7e14 !important; }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

.breadcrumb-nav {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.form-section {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Tab nav custom */
.nav-tabs-board {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs-board .nav-link {
    color: var(--text-muted);
    border: none;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
}

.nav-tabs-board .nav-link.active {
    color: var(--primary);
    border-bottom: 3px solid var(--secondary);
    background: transparent;
}

.nav-tabs-board .nav-link:hover {
    color: var(--primary);
}

/* Minutes editor */
.minutes-editor {
    min-height: 300px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Dynamic agenda builder */
.agenda-builder-item {
    background: var(--bg-body);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

/* Mobile toggle */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--primary);
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .sidebar-toggle {
        display: block;
    }
}
