/* ============================================
   VJA FOUNDATION ADMIN PANEL
   World-Class Dashboard Styles
   ============================================ */

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

:root {
    --primary: #AB3447;
    --primary-dark: #8A2A3A;
    --secondary: #472B65;
    --accent: #EBC352;
    --success: #2E7D5A;
    --warning: #D97706;
    --danger: #DC2626;
    --info: #2563EB;
    --dark: #0F172A;
    --dark-light: #1E293B;
    --dark-lighter: #334155;
    --light: #F1F5F9;
    --text: #64748B;
    --text-dark: #1E293B;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    height: 60px;
    margin-bottom: 16px;
}

.login-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.login-logo p {
    font-size: 0.875rem;
    color: var(--text);
    margin-top: 4px;
}

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

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(171, 52, 71, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-block { width: 100%; }

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-info {
    background: var(--info);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.75rem;
}

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

.alert-danger {
    background: #FEF2F2;
    color: var(--danger);
    border: 1px solid #FECACA;
}

.alert-success {
    background: #F0FDF4;
    color: var(--success);
    border: 1px solid #BBF7D0;
}

/* Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--dark);
    color: var(--white);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.sidebar-header img {
    height: 40px;
}

.sidebar-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: #94A3B8;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 4px;
    cursor: pointer;
    text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
    background: var(--dark-light);
    color: var(--white);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--dark-lighter);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: var(--dark-light);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--white);
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: var(--transition);
}

/* Top Header */
.top-header {
    background: var(--white);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-search {
    position: relative;
    width: 320px;
}

.header-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--light);
    transition: var(--transition);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

.header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
}

.header-btn:hover {
    background: var(--light);
    color: var(--primary);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content Area */
.content-area {
    padding: 32px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text);
    margin-bottom: 32px;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--text);
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.purple { background: #F3E8FF; color: #7C3AED; }
.stat-icon.blue { background: #DBEAFE; color: #2563EB; }
.stat-icon.green { background: #D1FAE5; color: #059669; }
.stat-icon.orange { background: #FFEDD5; color: #EA580C; }

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.stat-change.up {
    background: #D1FAE5;
    color: #059669;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 24px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
    background: var(--light);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: #FAFAFA;
}

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

.table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
}

.table-user-info {
    display: flex;
    flex-direction: column;
}

.table-user-name {
    font-weight: 600;
    color: var(--text-dark);
}

.table-user-email {
    font-size: 0.75rem;
    color: var(--text);
}

/* Status badges */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-success { background: #D1FAE5; color: #059669; }
.status-success .status-dot { background: #059669; }

.status-pending { background: #FFEDD5; color: #EA580C; }
.status-pending .status-dot { background: #EA580C; }

.status-danger { background: #FEE2E2; color: #DC2626; }
.status-danger .status-dot { background: #DC2626; }

.status-info { background: #DBEAFE; color: #2563EB; }
.status-info .status-dot { background: #2563EB; }

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

/* Activity feed */
.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.activity-text strong {
    font-weight: 600;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { width: 240px; }
    .main-content { margin-left: 240px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
    .header-search { display: none; }
    .content-area { padding: 20px; }
    .login-card { padding: 32px 24px; }
    .mobile-toggle { display: block; }
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--dark-lighter); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--dark-light); }

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

.animate-fadeIn {
    animation: fadeIn 0.4s ease forwards;
}
