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

:root {
    /* Color Palette - Elegant Ice Blue */
    --bg-body-start: #0f172a; /* Slate 900 */
    --bg-body-end: #1e293b;   /* Slate 800 */
    --bg-card: rgba(30, 41, 59, 0.65); /* Glassy Blue-Grey */
    --bg-card-hover: rgba(51, 65, 85, 0.75);
    
    --border-color: rgba(56, 189, 248, 0.15); /* Sky Blue 400 with opacity */
    --border-focus: rgba(56, 189, 248, 0.5);

    /* Text Colors */
    --text-primary: #f1f5f9;  /* Slate 100 - Soft White */
    --text-secondary: #94a3b8; /* Slate 400 - Muted Blue-Grey */
    --text-muted: #64748b;    /* Slate 500 - Darker Muted */

    /* Brand/Accent Colors */
    --primary: #38bdf8;       /* Sky 400 - Main Brand Color (Ice Blue) */
    --primary-glow: rgba(56, 189, 248, 0.35);
    --secondary: #0ea5e9;     /* Sky 500 - Slightly Darker */
    
    /* Functional Colors */
    --success: #2dd4bf;       /* Teal 400 - Cool Green */
    --success-bg: rgba(45, 212, 191, 0.1);
    --warning: #fbbf24;       /* Amber 400 */
    --danger: #f43f5e;        /* Rose 500 - Soft Red */
    --danger-bg: rgba(244, 63, 94, 0.1);
    
    /* Typography */
    --font-main: 'Outfit', sans-serif; /* Modern, geometric, clean */

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
}

body {
    background: radial-gradient(circle at top left, var(--bg-body-end), var(--bg-body-start));
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* --- Glassmorphism Cards --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    border-color: var(--border-focus);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    gap: 8px;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; /* White text on blue bg */
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #fff;
}

.btn-danger {
    background: rgba(244, 63, 94, 0.15);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

/* --- Forms --- */
input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm);
    color: var(--text-primary) !important;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Tables --- */
.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
}

.table thead th {
    text-align: left;
    padding: 16px;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.1);
}

.table tbody td {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
}

.table tbody tr:hover td {
    background: rgba(56, 189, 248, 0.05); /* very subtle blue tint on hover */
}

/* --- Sidebar (Common) --- */
.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.85); /* Slightly darker/more opaque than cards */
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.brand {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(to right, var(--primary), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-group { margin-bottom: 30px; }
.nav-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
    padding-left: 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-link i {
    width: 24px;
    margin-right: 10px;
    text-align: center;
    font-size: 16px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

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

.nav-link.active {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
}

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

.main-content {
    margin-left: 260px; /* matches sidebar width */
    padding: 40px;
    min-height: 100vh;
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; }
}

/* --- Status Pills --- */
.badge {
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.badge-ice {
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(45, 212, 191, 0.3);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

/* --- Utilities --- */
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.ms-auto { margin-left: auto; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.w-100 { width: 100%; }
.text-center { text-align: center; }
.text-end { text-align: right; }
