/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Modern Professional */
    --primary-h: 230;
    --primary-s: 60%;
    --primary-l: 50%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-dark: hsl(var(--primary-h), var(--primary-s), 40%);
    --primary-light: hsl(var(--primary-h), var(--primary-s), 95%);

    --secondary-h: 160;
    --secondary-s: 70%;
    --secondary-l: 45%;
    --secondary: hsl(var(--secondary-h), var(--secondary-s), var(--secondary-l));

    --background: #F8FAFC;
    --surface: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --border: #E2E8F0;
    --error: #EF4444;

    /* Spacing & Sizes */
    --sidebar-width: 280px;
    --header-height: 70px;
    --bottom-nav-height: 64px;
    --border-radius: 12px;

    /* Shadows - Premium Elevation */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-header: 0 4px 12px rgba(0, 0, 0, 0.03);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Public Sans', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* --- ADAPTIVE LAYOUT STRUCTURE --- */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* PC Sidebar - Hidden on Mobile */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 2000;
    display: none;
    /* Mobile first */
    flex-direction: column;
    padding: 1.5rem;
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.content-body {
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Mobile Top Nav / App Bar */
.mobile-header {
    height: 60px;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 1500;
    box-shadow: var(--shadow-header);
}

.mobile-header .logo-img {
    height: 32px;
    filter: brightness(0) invert(1);
}

/* Desktop Top Bar - Hidden on Mobile */
.desktop-top-bar {
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: none;
    /* Mobile first */
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-header);
}

/* --- COMPONENTS --- */

.card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* GRID SYSTEM */
.adaptive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.text-muted {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* NAVIGATION */

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.nav-link i {
    font-size: 1.25rem;
}

/* BOTTOM NAV (Mobile Only) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background: var(--surface);
    display: flex;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--border);
    z-index: 1500;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
}

.bottom-nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

/* FORMS */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #FFFFFF;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* STAT CARDS */
.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

/* --- MEDIA QUERIES (DESKTOP MODE) --- */

@media (min-width: 1024px) {
    .sidebar {
        display: flex;
    }

    .desktop-top-bar {
        display: flex;
    }

    .mobile-header,
    .bottom-nav {
        display: none !important;
    }

    .main-wrapper {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }

    .content-body {
        padding: 2rem;
    }

    .adaptive-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .adaptive-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Hover effects for PC only */
    .btn:active {
        transform: scale(0.98);
    }
}

/* --- AUTH PAGES (Adaptive) --- */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, var(--primary-light), #FFFFFF);
    padding: 1.5rem;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-brand img {
    height: 60px;
    margin-bottom: 1rem;
}

.auth-brand h2 {
    font-size: 1.75rem;
    color: var(--primary);
}

/* BADGES */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-verified,
.badge-paid {
    background: #DCFCE7;
    color: #166534;
}

.badge-pending {
    background: #FEF3C7;
    color: #92400E;
}

.badge-processing {
    background: #DBEAFE;
    color: #1E40AF;
}

/* DATA TABLES */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: var(--background);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

/* Prevent Text Selection - App-like Experience */
* {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Allow text selection in input fields */
input,
textarea,
.form-control,
[contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}
