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

:root {
    --primary: #006D77;
    --secondary: #E29578;
    --accent: #83C5BE;
    --dark: #2D3142;
    --sidebar-bg: #1e293b;
    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-muted: #64748b;
    --white: #ffffff;
    --radius: 16px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--body-bg);
    color: var(--dark);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    color: var(--white);
    padding: 20px 15px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    padding-left: 10px;
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--white), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav a i {
    width: 20px;
    margin-right: 10px;
    font-size: 1rem;
    opacity: 0.8;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: translateX(3px);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary) 0%, #004d4f 100%);
    box-shadow: 0 4px 12px rgba(0, 109, 119, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 30px;
}

.card {
    overflow-x: auto;
}

@media (max-width: 1200px) {
    .sidebar { width: 240px !important; }
    .main-content { margin-left: 240px !important; }
}

@media (max-width: 1024px) {
    body { display: block !important; }
    .sidebar {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 20px !important;
    }
    table { min-width: 720px; }

    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 1fr 2fr"],
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .main-content { padding: 15px !important; }
    h1 { font-size: 1.25rem; }
    .btn-admin { padding: 10px 14px; }
    table { min-width: 660px; }
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--dark);
}

/* Cards & Layout */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.03);
    margin-bottom: 25px;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(0,0,0,0.02);
}

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

.stat-info h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-info span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

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

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 109, 119, 0.1);
}

/* Buttons */
.btn-admin {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-add:hover {
    background-color: #005a62;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 109, 119, 0.2);
}

.btn-delete {
    background-color: #fff1f2;
    color: #e11d48;
    padding: 10px 20px;
}

.btn-delete:hover {
    background-color: #e11d48;
    color: var(--white);
}

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

th {
    text-align: left;
    padding: 15px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #f1f5f9;
}

td {
    padding: 20px;
    font-size: 0.95rem;
    border-bottom: 1px solid #f1f5f9;
}

tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Flatpickr Custom Style */
.flatpickr-calendar {
    box-shadow: 0 10px 40px rgba(0,0,0,0.1) !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 12px !important;
    font-family: 'Outfit', sans-serif !important;
}

.flatpickr-day.selected {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Settings Card Enhancements */
.settings-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.settings-item i {
    color: var(--primary);
    font-size: 1.1rem;
}

.settings-item div {
    flex: 1;
}

.settings-item label {
    margin-bottom: 2px !important;
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { width: 80px; padding: 20px 10px; }
    .sidebar h2, .sidebar-nav a span { display: none; }
    .sidebar-nav a { padding: 15px; justify-content: center; }
    .sidebar-nav a i { margin-right: 0; font-size: 1.3rem; }
    .main-content { margin-left: 80px; padding: 20px; }
}

@media (max-width: 768px) {
    .main-content { padding: 15px; }
    .card { padding: 20px; }
    .stats-grid { grid-template-columns: 1fr; }
    header { flex-direction: column; align-items: flex-start !important; gap: 15px; }
    .btn-admin { width: 100%; }
}
