/* css/settings.css */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz@14..32&display=swap');

* {
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f4f7fb;
}

/* custom navy/teal palette */
.bg-navy-sidebar { background-color: #0c2538; }
.bg-navy-deep { background-color: #0b1f33; }
.text-teal-logo { color: #5ee0d0; }
.border-teal-light { border-color: #2aa79b33; }

/* hover effect for nav items */
.hover-nav:hover { background-color: #1f4e5e; color: white; }

/* active navigation item */
.active-nav {
    background-color: #1a4450;
    border-left: 4px solid #2aa79b;
}

/* stat card styles */
.stat-card {
    transition: all 0.2s ease;
    border: 1px solid #eef2f6;
    background-color: white;
    border-radius: 0.75rem;
}
.stat-card:hover { box-shadow: 0 8px 20px -8px rgba(18, 79, 86, 0.15); }

/* dashboard background */
.bg-dashboard-bg { background-color: #f4f7fb; }

/* tab styling */
#settingsTabs a.active-tab {
    color: #0f766e;
    border-bottom-color: #0f766e;
}

/* form elements */
input[type="text"], input[type="email"], input[type="number"], input[type="url"], select, textarea {
    transition: all 0.2s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 1px #14b8a6;
}

/* checkbox styling */
input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: #0f766e; }
input[type="radio"] { accent-color: #0f766e; }

/* button styling */
.bg-teal-700 { background-color: #0f766e; }
.bg-teal-700:hover { background-color: #115e59; }
.bg-red-600 { background-color: #dc2626; }
.bg-red-600:hover { background-color: #b91c1c; }

/* Account header with logout button */
.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.logout-btn {
    padding: 0.5rem 1.5rem;
    background-color: #dc2626;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.logout-btn:hover {
    background-color: #b91c1c;
}

/* code block */
code {
    font-family: 'Courier New', monospace;
    background-color: #f3f4f6;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

/* integration items */
.bg-gray-50 { background-color: #f9fafb; }

/* transitions */
.transition, .transition-colors { transition: all 0.2s ease; }

/* mobile header spacer */
.mobile-header-spacer { height: 60px; width: 100%; }

/* Main content area fix */
main {
    padding-top: 0;
}

/* Ensure proper layout */
.flex.h-screen {
    height: 100vh;
}

.flex-1.overflow-y-auto {
    flex: 1;
    overflow-y: auto;
    height: 100%;
}

/* Modal overlay */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Modal display fix */
#categoryModal.hidden,
#departmentModal.hidden,
#deleteModal.hidden {
    display: none;
}

#categoryModal:not(.hidden),
#departmentModal:not(.hidden),
#deleteModal:not(.hidden) {
    display: flex;
}

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */

/* Sidebar - Mobile */
@media (max-width: 768px) {
    .w-72 {
        width: 100%;
        max-width: 280px;
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    .w-72.open { left: 0; }
    main { width: 100%; margin-left: 0; }
    
    .menu-toggle {
        display: block;
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 1001;
        background: #0c2538;
        color: white;
        border: none;
        border-radius: 8px;
        padding: 8px 12px;
        cursor: pointer;
        font-size: 1.25rem;
        line-height: 1;
        width: auto;
        min-width: 44px;
        text-align: center;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .sidebar-overlay.active { display: block; }
}

@media (min-width: 769px) {
    .menu-toggle { display: none; }
    .sidebar-overlay { display: none !important; }
    .w-72 { position: relative; left: 0 !important; }
    .mobile-header-spacer { display: none; }
}

/* Tabs responsive */
@media (max-width: 640px) {
    #settingsTabs li a { padding: 0.5rem 0.75rem; font-size: 0.7rem; }
}

/* Header responsive */
@media (max-width: 640px) {
    h1 { font-size: 1.5rem; }
    .text-sm.text-gray-500.mt-1 { font-size: 0.75rem; }
}

/* Form grid responsive */
@media (max-width: 768px) {
    .grid-cols-1.md\:grid-cols-3 { grid-template-columns: 1fr; gap: 0.75rem; }
    .grid-cols-2 { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* Buttons responsive */
@media (max-width: 640px) {
    .flex.flex-col.sm\:flex-row { flex-direction: column; }
    button { width: 100%; justify-content: center; }
}

/* Touch-friendly */
@media (max-width: 768px) {
    button, a, input, select { min-height: 44px; }
    body { font-size: 14px; }
    input, select { font-size: 16px !important; }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Print styles */
@media print {
    .sidebar, nav, .menu-toggle, button, .bg-teal-700 {
        display: none !important;
    }
    main {
        margin: 0;
        padding: 0;
    }
    .stat-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Hidden class for change password form */
.hidden {
    display: none;
}