:root {
    --primary: #4a148c;
    --primary-light: #7c43bd;
    --secondary: #FFD700;
    --dark: #1e1e2d;
    --light-bg: #f5f8fa;
    --white: #ffffff;
    --gray: #a1a5b7;
    --border: #e4e6ef;
    --success: #50cd89;
    --danger: #f1416c;
    --warning: #ffc700;
    --info: #009ef7;

    --sidebar-width: 260px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: #3f4254;
    font-size: 14px;
    line-height: 1.5;
}

/* Utils */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.full-width {
    width: 100%;
}

/* Auth */
.auth-wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #2E0249 100%);
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.auth-box .logo-area {
    text-align: center;
    margin-bottom: 30px;
}

.auth-box img {
    height: 60px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

/* Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    font-size: 1.1rem;
}

.sidebar-header img {
    height: 35px;
    margin-right: 10px;
    border-radius: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--gray);
    text-decoration: none;
    transition: 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-right: 4px solid var(--primary);
}

.nav-link i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 15px 25px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info .avatar {
    width: 35px;
    height: 35px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.user-info .details {
    display: flex;
    flex-direction: column;
}

.user-info .badge {
    font-size: 10px;
    color: var(--gray);
}

.logout-btn {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
}

.logout-btn:hover {
    color: var(--danger);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #181c32;
}

/* Cards & Widgets */
.content-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.03);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
}

.stat-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
}

.stat-card .icon.blue {
    background: rgba(0, 158, 247, 0.1);
    color: var(--info);
}

.stat-card .icon.green {
    background: rgba(80, 205, 137, 0.1);
    color: var(--success);
}

.stat-card .icon.orange {
    background: rgba(255, 199, 0, 0.1);
    color: var(--warning);
}

.stat-card .icon.purple {
    background: rgba(124, 67, 189, 0.1);
    color: var(--primary);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #181c32;
    margin-top: 5px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table,
.simple-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.simple-table th {
    text-align: left;
    padding: 12px 15px;
    background: var(--light-bg);
    color: #b5b5c3;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td,
.simple-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    color: #464e5f;
    font-weight: 500;
}

.data-table tr:hover {
    background-color: #fcfcfc;
}

/* Helpers */
.badge-status {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-status.paid {
    background: rgba(80, 205, 137, 0.1);
    color: var(--success);
}

.badge-status.unpaid {
    background: rgba(241, 65, 108, 0.1);
    color: var(--danger);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 600px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.close-modal:hover {
    color: var(--danger);
}

.modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: right;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--gray);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
}

.btn-outline:hover {
    border-color: var(--dark);
    color: var(--dark);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group.half {
    flex: 1;
}

.form-group.third {
    flex: 1;
}

/* Radio Group Styles */
.radio-group {
    display: flex;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95em;
    color: var(--dark);
}

.radio-label input {
    margin-right: 8px;
    accent-color: var(--primary);
    width: auto;
}