/* style.css - Premium Glassmorphism Design */
:root {
    --primary-color: #4F46E5;
    /* Vibrant Indigo */
    --primary-hover: #4338CA;
    --secondary-color: #EC4899;
    /* Vibrant Pink */
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e1b4b;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --font-family: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    min-height: 100vh;
    background-attachment: fixed;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.glass-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.glass-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

select.glass-input option {
    background-color: var(--bg-gradient-end);
    color: var(--text-primary);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-weight: 500;
    text-align: center;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* Login Page Styles */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-panel {
    padding: 40px;
}

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

.login-header h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
}

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

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--glass-border);
}

.nav-menu {
    padding: 20px 0;
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-header h3 {
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 4px 12px;
    border-radius: 8px;
    font-weight: 500;
}

.nav-link i {
    margin-right: 12px;
    font-size: 1.1rem;
    color: var(--primary-color);
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.15), transparent);
    color: var(--text-primary);
    transform: translateX(5px);
}

.nav-link.active i,
.nav-link:hover i {
    color: var(--secondary-color);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 70px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* Cards & Dashboards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kpi-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
}

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

.glass-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

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

.glass-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.glass-table tbody tr {
    transition: background 0.3s;
}

.glass-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-backdrop.active .modal {
    transform: translateY(0);
}

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

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

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

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}