/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb;       /* Professional Blue */
    --primary-hover: #1d4ed8;
    --secondary: #0ea5e9;
    --background: #f8fafc;    /* Clean, bright background */
    --surface: #ffffff;       /* Solid white cards */
    --surface-border: #e2e8f0;
    --text-main: #0f172a;     /* Dark text for readability */
    --text-muted: #64748b;
    --danger: #ef4444;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

/* Glassmorphism/Card utility */
.glass-panel {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease;
}

.glass-panel:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

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

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

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--surface-border);
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo i {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* Auth Pages */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px); /* minus nav */
    background-color: var(--background);
}

.auth-card {
    width: 100%;
    max-width: 400px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #eff6ff; /* light blue tint */
    color: var(--primary);
}

/* Dropdown styles */
.dropdown { position: relative; display: inline-block; }
.dropdown-content { display: none; position: absolute; background-color: var(--surface); min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1); z-index: 200; border-radius: 8px; overflow: hidden; border: 1px solid var(--surface-border); }
.dropdown-content a { color: var(--text-main); padding: 12px 16px; text-decoration: none; display: block; font-size: 0.9rem; }
.dropdown-content a:hover { background-color: #f1f5f9; color: var(--primary); }
.dropdown:hover .dropdown-content { display: block; }

/* Mobile Responsiveness */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--surface-border);
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        align-items: flex-start;
        gap: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* Global grid-2 responsiveness */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.flex-responsive {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr !important;
    }
    .flex-responsive {
        flex-direction: column;
        align-items: stretch;
    }
    .table-responsive table {
        min-width: 600px; /* Force minimum width to enable scrolling */
    }
}

/* Custom Modal System */
.konversa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.konversa-modal-overlay.active {
    display: flex;
    opacity: 1;
}
.konversa-modal {
    background: var(--surface);
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}
.konversa-modal-overlay.active .konversa-modal {
    transform: translateY(0) scale(1);
}
.konversa-modal-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}
.konversa-modal-body {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}
.konversa-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.btn-cancel {
    background: #f1f5f9;
    color: var(--text-main);
}
.btn-cancel:hover {
    background: #e2e8f0;
}
