@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #047857; /* Deep modern green */
    --primary-hover: #065f46;
    --primary-light: #d1fae5;
    --accent: #10b981;
    --ink: #1f2937;
    --ink-light: #4b5563;
    --muted: #6b7280;
    --line: #e5e7eb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fee2e2;
    --bg-main: #f3f4f6;
    --bg-card: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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);
    --shadow-glow: 0 0 15px rgba(16, 185, 129, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
    --font-base: 'Inter', 'Noto Sans Bengali', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
}

body {
    margin: 0;
    background: var(--bg-main);
    color: var(--ink);
    font-family: var(--font-base);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(circle at top right, #e0f2fe 0%, transparent 40%),
                      radial-gradient(circle at bottom left, #d1fae5 0%, transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: min(1200px, calc(100% - 40px));
    margin: auto;
}

/* Header & Nav */
.site-header {
    background: rgba(4, 120, 87, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.nav {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.brand:hover {
    color: var(--primary-light);
    transform: translateY(-1px);
}

.nav nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.nav nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

main.container {
    padding: 40px 0 60px;
    flex: 1;
}

/* Footer */
.site-footer {
    padding: 30px 0;
    background: #111827;
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
    margin-top: auto;
}

/* Typography */
h1, h2, h3 {
    color: var(--ink);
    letter-spacing: -0.5px;
}

.hero {
    margin-bottom: 30px;
    text-align: center;
    animation: fadeInDown 0.6s ease-out;
}

.hero h1 {
    margin: 0 0 12px;
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.muted {
    color: var(--muted);
}

/* Card Design (Glassmorphism + Premium) */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: var(--radius);
    padding: 28px;
    margin: 20px 0;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
    animation: fadeInUp 0.6s ease-out;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Grids */
.filter-grid, .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.full {
    grid-column: 1 / -1;
}

/* Forms */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ink-light);
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font: inherit;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Buttons */
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    gap: 8px;
}

button:hover, .button:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

button:active, .button:active {
    transform: translateY(1px);
    box-shadow: none;
}

.button.secondary {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
}

.button.secondary:hover {
    background: #f9fafb;
    border-color: var(--muted);
    box-shadow: var(--shadow-sm);
}

.button.danger {
    background: var(--danger);
}

.button.danger:hover {
    background: var(--danger-hover);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* Notices / Alerts */
.notice {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin: 20px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    border-left: 4px solid transparent;
    animation: slideIn 0.4s ease-out;
}

.notice.success {
    background: var(--primary-light);
    color: var(--primary-hover);
    border-left-color: var(--primary);
}

.notice.error {
    background: var(--danger-light);
    color: var(--danger-hover);
    border-left-color: var(--danger);
}

/* Admin Menu */
.admin-menu {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    background: #fff;
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}

.admin-menu a {
    padding: 10px 16px;
    background: var(--bg-main);
    color: var(--ink-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 500;
}

.admin-menu a:hover, .admin-menu a.active {
    background: var(--primary-light);
    color: var(--primary-hover);
}

/* Table Design */
.summary {
    font-size: 18px;
    font-weight: 700;
    margin: 30px 0 16px;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-wrap {
    overflow-x: auto;
    padding: 0; /* Remove padding from card for edge-to-edge table */
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    background: #fff;
}

th, td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    background: #f9fafb;
    font-weight: 700;
    color: var(--ink-light);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

tr:hover td {
    background: #f8fafc;
}

tr:last-child td {
    border-bottom: none;
}

.number {
    text-align: right;
    font-weight: 700;
    color: var(--primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.pagination a, .pagination span {
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--ink-light);
    font-weight: 600;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

/* Utility */
.login {
    max-width: 460px;
    margin: 80px auto;
}

.small {
    font-size: 13px;
    color: var(--muted);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Mobile Responsiveness */
@media (max-width: 800px) {
    .filter-grid, .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hero h1 {
        font-size: 28px;
    }
    .nav {
        flex-direction: column;
        justify-content: center;
        padding: 15px 0;
        gap: 12px;
    }
    .table-wrap {
        border-radius: var(--radius-sm);
    }
}

@media (max-width: 520px) {
    .container {
        width: calc(100% - 30px);
    }
    .filter-grid, .form-grid {
        grid-template-columns: 1fr;
    }
    .brand {
        font-size: 20px;
    }
    .card {
        padding: 20px;
    }
    .actions {
        flex-direction: column;
        width: 100%;
    }
    .actions button, .actions .button {
        width: 100%;
    }
    .admin-menu {
        flex-direction: column;
    }
    .admin-menu a {
        text-align: center;
    }
}
