/* ===========================
   Archive Management System (AMS)
   Main Stylesheet
   =========================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --sidebar-width: 260px;
    --topbar-height: 70px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
    max-width: 100vw;
}

* {
    box-sizing: border-box;
}

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

.table-responsive {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.table {
    min-width: 100%;
    width: max-content;
}

/* ===========================
   Sidebar Navigation
   =========================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.user-info {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    font-size: 60px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.user-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 25px;
}

.sidebar-nav li a.active {
    background: var(--primary-color);
    color: white;
    border-left: 4px solid white;
}

.sidebar-nav li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* removed submenu styles */

.menu-section {
    padding: 20px 20px 10px;
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    letter-spacing: 1px;
}

/* ===========================
   Main Content Area
   =========================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-color);
    cursor: pointer;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-color);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.company-mode-toggle {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px 12px;
    background: #f8fafc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    gap: 12px;
}

.company-mode-toggle .toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.company-mode-toggle .toggle-text {
    font-weight: 600;
    color: #0f172a;
}

.company-mode-toggle .switch {
    position: relative;
    width: 44px;
    height: 22px;
}

.company-mode-toggle .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.company-mode-toggle .slider {
    position: absolute;
    inset: 0;
    background: #cbd5f5;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.company-mode-toggle .slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    top: 2px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
}

.company-mode-toggle .switch input:checked + .slider {
    background: #34d399;
}

.company-mode-toggle .switch input:checked + .slider::before {
    transform: translateX(22px);
}

.notification-shell {
    position: relative;
}

.notification-button {
.notification-dropdown .dropdown-header.secondary {
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.dropdown-section-body {
    max-height: 220px;
    overflow-y: auto;
}

.activity-row {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    font-size: 13px;
}

.activity-body p {
    margin: 0;
    font-size: 13px;
    color: #1e293b;
    font-weight: 500;
}

.activity-body small {
    color: #94a3b8;
    font-size: 11px;
}

    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--secondary-color);
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.notification-button .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger-color);
    color: #fff;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
}

.notification-shell.open .notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: 320px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 200;
}

.notification-dropdown .dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown .dropdown-header strong {
    font-size: 14px;
    color: #0f172a;
}

.notification-dropdown .status-pill {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.notification-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.notification-dropdown li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.notification-dropdown li:last-child {
    border-bottom: none;
}

.notification-dropdown .notif-title {
    margin: 0 0 4px;
    font-weight: 600;
    color: #1f2937;
    font-size: 13px;
}

.notification-dropdown small {
    color: #94a3b8;
    font-size: 12px;
}

.notification-dropdown .notif-link {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4338ca;
}

.notification-dropdown .dropdown-footer {
    border-top: 1px solid #f1f5f9;
    padding: 12px 16px;
    text-align: center;
}

.notification-dropdown .dropdown-footer a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
    font-size: 13px;
}

.notification-dropdown .empty-state {
    text-align: center;
    padding: 28px 16px;
    color: #94a3b8;
    font-size: 13px;
}

.limit-indicator {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px 18px;
    background: #fff;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.limit-indicator.limit-warning {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.limit-indicator.limit-danger {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.limit-indicator .limit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.limit-indicator .limit-label {
    margin: 0;
    font-size: 13px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.limit-indicator .limit-meta {
    font-size: 12px;
    color: #64748b;
    margin-left: 8px;
}

.limit-progress {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.limit-progress .limit-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.limit-indicator .limit-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.review-alert {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    background: rgba(37, 99, 235, 0.08);
    margin-bottom: 18px;
    align-items: flex-start;
}

.review-alert .alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
}

.review-alert h4 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #0f172a;
}

.review-alert p {
    margin: 0;
    color: #475569;
    font-size: 13px;
}

.billing-lock-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.billing-lock-card {
    background: #fff;
    border-radius: 18px;
    padding: 32px;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
}

.billing-lock-card .lock-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(248, 113, 113, 0.15);
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 18px;
}

.billing-lock-card h3 {
    margin: 0 0 12px;
    font-size: 20px;
    color: #111827;
}

.billing-lock-card p {
    margin: 0 0 24px;
    color: #4b5563;
    line-height: 1.6;
}

.lock-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.content-wrapper {
    padding: 30px;
}

/* ===========================
   Cards & Boxes
   =========================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon.green { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stat-icon.red { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.stat-icon.cyan { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }

.stat-details h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-details p {
    font-size: 13px;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

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

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
}

.card-body {
    padding: 25px;
}

/* ===========================
   Settings Page
   =========================== */
.settings-card .card-header {
    align-items: flex-start;
}

.settings-card .card-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-body {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 5px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 24px;
}

.settings-card-block {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.block-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.block-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
}

.reference-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.calendar-icon {
    background: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 100%);
}

.block-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.block-header p {
    margin: 4px 0 0;
    color: var(--secondary-color);
    font-size: 13px;
}

.block-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.summary-chip {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    padding: 14px 16px;
    min-width: 170px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-chip .label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--secondary-color);
    letter-spacing: 0.6px;
}

.summary-chip strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
}

.summary-chip small {
    font-size: 12px;
    color: var(--secondary-color);
}

.block-divider {
    height: 1px;
    background: var(--border-color);
    opacity: 0.6;
}

.format-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.format-chip {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.format-chip .chip-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-color);
    text-transform: uppercase;
}

.format-chip .chip-detail {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    background: #ffffff;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
}

.format-chip p {
    margin: 0;
    font-size: 13px;
    color: var(--secondary-color);
}

.calendar-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.calendar-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.calendar-option {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    background: #ffffff;
    transition: all 0.2s ease;
    cursor: pointer;
    display: block;
}

.calendar-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.calendar-option .option-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.calendar-option .option-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.calendar-option .option-body h5 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
}

.calendar-option .option-body p {
    margin: 0 0 10px;
    color: var(--secondary-color);
    font-size: 13px;
}

.option-features {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--secondary-color);
    font-size: 13px;
}

.option-features li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-features li i {
    font-size: 12px;
    color: var(--primary-color);
}

.option-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--secondary-color);
}

.option-preview strong {
    font-size: 14px;
    color: var(--dark-color);
    font-weight: 600;
}

.calendar-option.active {
    border-color: var(--primary-color);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.15);
    background: #eef2ff;
}

.calendar-option.active .option-icon {
    background: var(--primary-color);
    color: #ffffff;
}

.calendar-submit {
    align-self: flex-start;
}

.settings-panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-panel-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.settings-panel-header h4 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-panel-header p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 13px;
}

.settings-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.summary-item {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    padding: 14px 18px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--secondary-color);
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.code-value {
    font-family: 'Courier New', Courier, monospace;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
    background: #ffffff;
}

.summary-help {
    font-size: 12px;
    color: var(--secondary-color);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.settings-panel-subheader h5 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.settings-panel-subheader p {
    margin: 4px 0 0;
    color: var(--secondary-color);
    font-size: 12px;
}

.settings-divider {
    height: 1px;
    background: var(--border-color);
    opacity: 0.6;
}

.settings-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.info-item {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
}

.info-item code {
    font-family: 'Courier New', Courier, monospace;
    background: #ffffff;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 6px 8px;
    display: inline-block;
}

.info-item p {
    margin: 0;
    font-size: 13px;
    color: var(--secondary-color);
}

.settings-note {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
}

.settings-note ul {
    margin: 0;
    padding-left: 18px;
    color: var(--secondary-color);
    line-height: 1.6;
}

.calendar-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    padding: 16px 20px;
}

.calendar-preview .preview-item span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    margin-bottom: 4px;
}

.calendar-preview .preview-item strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
}

.format-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.example-card {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.example-card h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.example-card code {
    font-family: 'Courier New', Courier, monospace;
    background: #ffffff;
    border-radius: 6px;
    padding: 6px 8px;
    border: 1px dashed rgba(148, 163, 184, 0.4);
}

.example-card p {
    margin: 0;
    font-size: 13px;
    color: var(--secondary-color);
    line-height: 1.5;
}

/* ===========================
   Forms
   =========================== */
.form-group {
    margin-bottom: 20px;
}

.calendar-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-view {
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: 8px;
    padding: 15px;
}

.calendar-view small {
    display: block;
    margin-top: 6px;
    color: var(--secondary-color);
}

.ethiopian-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.hijri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-label.required::after {
    content: " *";
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

form button.btn:hover {
    opacity: 0.9;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.inline-form {
    display: inline-block;
    margin: 0;
}

.inline-form select {
    min-width: 120px;
}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 25px;
}

.plan-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.plan-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.plan-summary-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
}

.plan-meta {
    margin: 4px 0 0;
    color: var(--secondary-color);
    font-size: 13px;
}

.plan-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.usage-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.usage-progress {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.usage-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.usage-label {
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.usage-value {
    font-size: 13px;
    color: var(--secondary-color);
}

.usage-bar {
    position: relative;
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    border-radius: 20px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.usage-bar-fill.warning {
    background: linear-gradient(90deg, #fbbf24 0%, #f97316 100%);
}

.usage-bar-fill.danger {
    background: linear-gradient(90deg, #f87171 0%, #dc2626 100%);
}

.usage-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.metric-chip {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-chip .label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--secondary-color);
    letter-spacing: 0.5px;
}

.metric-chip strong {
    font-size: 18px;
    color: var(--dark-color);
}

.alert-card .card-body {
    padding-top: 20px;
}

.alert-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
}

.alert-list li i {
    font-size: 16px;
}

.alert-list li.info {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

.alert-list li.warning {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.alert-list li.danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.plan-body .summary-chip strong .badge {
    margin-left: 0;
}

.dashboard-overview-grid .card {
    margin-bottom: 0;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

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

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

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

/* ===========================
   Tables
   =========================== */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--light-color);
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.table-actions {
    display: flex;
    gap: 10px;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fed7aa;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

/* ===========================
   Pagination
   =========================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===========================
   Alerts
   =========================== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: #fed7aa;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info-color);
}

/* ===========================
   Modal
   =========================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-color);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* ===========================
   Login Page
   =========================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--secondary-color);
}

.auth-logo {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* ===========================
   Charts Container
   =========================== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-container h4 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

/* ===========================
   Search Filters
   =========================== */
.search-filters {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

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

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .content-wrapper {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .topbar {
        padding: 0 15px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .table-responsive {
        font-size: 12px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .auth-card {
        padding: 25px;
    }
}

/* ===========================
   Utility Classes
   =========================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.text-muted { color: var(--secondary-color); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }

/* ===========================
   Print Styles
   =========================== */
@media print {
    /* Hide navigation and UI elements */
    .sidebar,
    .topbar,
    .sidebar-nav,
    .mobile-toggle,
    .btn,
    button,
    .pagination,
    .table-actions,
    .notification-icon,
    .user-menu,
    .card-header .btn,
    .form-actions,
    .alert {
        display: none !important;
    }
    
    /* Reset layout for printing */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .content-wrapper {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #000;
    }
    
    /* Keep only essential card header info */
    .card-header {
        border: none !important;
        padding: 10px !important;
        background: white !important;
    }
    
    .card-header h3 {
        font-size: 16px !important;
    }
    
    /* Optimize table for print */
    .table {
        font-size: 11px;
    }
    
    /* Page breaks */
    .card {
        page-break-inside: avoid;
    }
    
    /* Show print-only elements */
    .print-only {
        display: block !important;
    }
    
    /* Remove colors for print economy */
    body {
        background: white !important;
    }
}

/* ===========================
   File Preview Styles
   =========================== */
.file-preview-container {
    margin: 20px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--light-color);
}

.file-preview-header {
    padding: 15px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-preview-body {
    padding: 20px;
    background: #f8f9fa;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview-body iframe {
    width: 100%;
    height: 600px;
    border: none;
    background: white;
}

.file-preview-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.workspace-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 18px;
}

.workspace-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--dark-color);
}

.workspace-toggle:hover {
    background: #e2e8f0;
}

.workspace-toggle i {
    font-size: 12px;
    color: var(--secondary-color);
}

.workspace-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.workspace-company {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--secondary-color);
}

.workspace-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
}

.workspace-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    padding: 16px;
    display: none;
    z-index: 1100;
}

.workspace-switcher.open .workspace-dropdown {
    display: block;
}

.workspace-switcher.open .workspace-toggle {
    border-color: var(--primary-color);
    background: #e0e7ff;
}

.workspace-dropdown .dropdown-section + .dropdown-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.workspace-dropdown h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--secondary-color);
    margin: 0 0 10px;
}

.workspace-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.workspace-dropdown li a,
.workspace-dropdown li span {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--dark-color);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.workspace-dropdown li a:hover {
    background: #f1f5f9;
}

.workspace-dropdown li.active a {
    background: #e0e7ff;
    color: var(--primary-color);
    font-weight: 600;
}

.workspace-dropdown li.disabled span {
    color: var(--secondary-color);
    opacity: 0.7;
}

.workspace-dropdown li i {
    width: 18px;
    text-align: center;
}

@media (max-width: 768px) {
    .workspace-switcher {
        margin-right: 10px;
    }

    .workspace-dropdown {
        width: 260px;
    }
}

.plan-selection {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.plan-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.plan-card.current {
    border-color: var(--primary-color);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.15);
    background: #eef2ff;
}

.plan-card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-card-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.plan-price {
    font-size: 14px;
    color: var(--secondary-color);
}

.plan-description {
    margin: 0;
    font-size: 13px;
    color: var(--secondary-color);
    min-height: 38px;
}

.plan-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--secondary-color);
    font-size: 13px;
}

.plan-feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-feature-list li i {
    color: var(--primary-color);
}

.billing-toggle {
    display: flex;
    gap: 14px;
    font-size: 13px;
}

.billing-toggle label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.billing-toggle input[type="radio"] {
    accent-color: var(--primary-color);
}

.workspace-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f1f5f9;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-pill input[type="checkbox"] {
    accent-color: var(--primary-color);
}

.checkbox-pill:hover {
    background: #e2e8f0;
}

.branding-preview {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.branding-preview .branding-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #94a3b8;
    overflow: hidden;
}

.branding-preview .branding-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.branding-preview .branding-meta h4 {
    margin: 0;
    font-size: 18px;
}

.branding-preview .color-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    font-size: 12px;
    margin-right: 10px;
}

.branding-preview .color-chip .chip-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

