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

:root {
    --primary: #2E86C1;
    --primary-light: #5DADE2;
    --primary-dark: #1A5276;
    --secondary: #D6EAF8;
    --accent: #E74C3C;
    --bg-color: #F8FAFC;
    --surface: rgba(255, 255, 255, 0.75); /* Glass effect */
    --surface-solid: rgba(255, 255, 255, 1);
    --surface-border: rgba(255, 255, 255, 0.5);
    --text-main: #1E293B;
    --text-muted: #64748B;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.02);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.05);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    
    --radius: 16px;
}

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

body {
    background: var(--bg-color);
    background-image: radial-gradient(circle at -10% -10%, #E0F2FE 0%, transparent 40%),
                      radial-gradient(circle at 110% 110%, #F5F3FF 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-glass);
    padding: 24px;
}

/* Typography */
h1, h2, h3, h4 { color: var(--text-main); font-weight: 600; }
p { line-height: 1.6; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #3498DB);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 134, 193, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 134, 193, 0.4);
    background: linear-gradient(135deg, #2471A3, var(--primary));
}

.btn-secondary {
    background: var(--surface-solid);
    color: var(--primary);
    border: 1px solid var(--primary-light);
}

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

/* Inputs */
.form-group { margin-bottom: 1.2rem; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    background: var(--surface-solid);
    transition: var(--transition);
    font-size: 0.95rem;
    color: var(--text-main);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(46, 134, 193, 0.15);
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--surface-solid);
    border-right: 1px solid rgba(0,0,0,0.05);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 0 24px 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo-icon {
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.sidebar-header h2 {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    margin: 4px 16px;
    border-radius: 10px;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 134, 193, 0.2);
}

.nav-link.active i { color: white; }

.nav-link i {
    margin-right: 14px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: var(--primary-light);
    transition: var(--transition);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px 48px;
    transition: var(--transition);
    min-height: 100vh;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: transparent;
}

.header-title h1 {
    font-size: 1.8rem;
    margin-bottom: 4px;
}
.header-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    padding: 8px 16px;
    border-radius: 40px;
    border: 1px solid rgba(0,0,0,0.05);
}

.user-info {
    text-align: right;
}
.user-info h4 { font-size: 0.95rem; margin: 0; }
.user-info span { font-size: 0.8rem; color: var(--text-muted); }

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

/* Cards & Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--surface-solid);
    border: none;
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-info h3 { margin: 0; font-size: 2rem; }
.stat-info p { margin: 0; color: var(--text-muted); font-size: 0.95rem; font-weight: 500;}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0,0,0,0.02);
    border-bottom: 2px solid rgba(0,0,0,0.05);
}

th:first-child { border-top-left-radius: 12px; }
th:last-child { border-top-right-radius: 12px; }

td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    color: var(--text-main);
    font-size: 0.95rem;
}

tbody tr { transition: var(--transition); }
tbody tr:hover { background: rgba(0,0,0,0.015); }

/* Badges */
.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}
.badge-pending { background: #FEF3C7; color: #D97706; }
.badge-active { background: #D1FAE5; color: #059669; }
.badge-done { background: #DBEAFE; color: #2563EB; }

/* Responsive */
.mobile-nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 8px;
    border-radius: 8px;
}

@media (max-width: 1024px) {
    .main-content { padding: 24px; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); z-index: 1000; }
    .sidebar.open { transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,0.1); }
    .main-content { margin-left: 0; padding: 20px; }
    .mobile-nav-toggle { display: block; }
    .grid { grid-template-columns: 1fr; }
    .top-header { flex-direction: column; align-items: flex-start; gap: 20px; }
    .user-profile { align-self: flex-end; }
}

/* Authentication Page Specific */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}
.auth-card {
    max-width: 440px;
    width: 100%;
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header .logo-icon {
    width: 60px; height: 60px; font-size: 2rem; margin: 0 auto 16px; border-radius: 16px; background: var(--primary); color: white; display:flex; align-items:center; justify-content:center;
}
