:root {
    --primary: #6E3FF3;
    --primary-dark: #5829d6;
    --primary-light: #F4F0FF;
    --secondary: #00C853;
    --warning: #FFAB00;
    --danger: #FF3D57;
    --info: #00B0FF;
    --dark: #1E293B;
    --text-muted: #64748B;
    --bg-main: #F8F6FD;
    --card-bg: #FFFFFF;
    --border: #E2E8F0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(110,63,243,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    width: 38px;
    height: 38px;
    background: var(--primary);
    color: #FFF;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    flex: 1;
    overflow-y: auto;
}

.menu-item {
    margin-bottom: 6px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.menu-link:hover, .menu-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* Main Layout */
.main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-navbar {
    height: 70px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.content-area {
    padding: 30px;
    flex: 1;
}

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

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(110,63,243,0.05);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

/* Custom Table Design */
.panel-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 30px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

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

.search-input {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    min-width: 250px;
    transition: border 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
}

.table-responsive {
    overflow-x: auto;
}

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

.custom-table th {
    background: var(--bg-main);
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.custom-table td {
    padding: 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--dark);
}

.custom-table tr:hover td {
    background: var(--primary-light);
}

/* Status Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-active, .badge-verified, .badge-approved { background: #E8F5E9; color: #2E7D32; }
.badge-trial, .badge-pending, .badge-submitted { background: #FFF8E1; color: #F57F17; }
.badge-expired, .badge-suspended, .badge-rejected { background: #FFEBEE; color: #C62828; }

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

.btn-primary { background: var(--primary); color: #FFF; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #FFF; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--dark); }

/* Action Icons */
.action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: #FFF;
    color: var(--dark);
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s;
}

.action-btn:hover { background: var(--primary-light); color: var(--primary); }
.action-btn.btn-delete:hover { background: #FFEBEE; color: var(--danger); }
.action-btn.btn-shield { color: var(--primary); }

/* Modals */
.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; }

.modal-content {
    background: #FFF;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
