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

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #10B981;
    --dark: #1E293B;
    --light: #F8FAFC;
    --gray: #64748B;
    --border: #E2E8F0;
    --danger: #EF4444;
    --white: #FFFFFF;
    --sidebar-bg: #0F172A;
    --sidebar-hover: #1E293B;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    background-color: #F1F5F9;
    color: var(--dark);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--white);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.sidebar-header {
    padding: 24px 20px;
    font-size: 22px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-header i { color: var(--primary); }

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #94A3B8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background-color: var(--sidebar-hover);
    color: var(--white);
    border-left: 4px solid var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    background-color: var(--white);
    height: 70px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

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

/* Card */
.card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 25px;
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-success { background-color: var(--secondary); color: white; }
.btn-success:hover { background-color: #059669; }
.btn-danger { background-color: var(--danger); color: white; }
.btn-danger:hover { background-color: #DC2626; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: var(--gray);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.table th {
    background-color: #F8FAFC;
    font-weight: 600;
    color: var(--gray);
}

.table tbody tr:hover {
    background-color: #F1F5F9;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-active { background-color: #D1FAE5; color: #065F46; }
.badge-inactive { background-color: #FEE2E2; color: #991B1B; }

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-success { background-color: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger { background-color: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.2s;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
