/* Brass Band Concert - Attendance System CSS */
/* Matching the Next.js design exactly */

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

:root {
    --background: #f8f7fc;
    --foreground: #1a1625;
    --card: #ffffff;
    --card-foreground: #1a1625;
    --popover: #ffffff;
    --popover-foreground: #1a1625;
    --primary: #4f46a8;
    --primary-foreground: #fafafa;
    --secondary: #efedf5;
    --secondary-foreground: #2d2640;
    --muted: #f0eef5;
    --muted-foreground: #6b6180;
    --accent: #d97706;
    --accent-foreground: #1a1625;
    --destructive: #dc2626;
    --destructive-foreground: #fafafa;
    --border: #e0dce8;
    --input: #e0dce8;
    --ring: #4f46a8;
    --success: #16a34a;
    --success-foreground: #fafafa;
    --chart-2: #d97706;
    --chart-3: #16a34a;
    --sidebar: #2d2640;
    --sidebar-foreground: #f5f5f5;
    --sidebar-primary: #d97706;
    --sidebar-primary-foreground: #1a1625;
    --sidebar-accent: #3d3555;
    --sidebar-accent-foreground: #f5f5f5;
    --sidebar-border: #3d3555;
    --radius: 0.625rem;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: #433b8f;
}

.btn-outline {
    background-color: transparent;
    color: var(--foreground);
    border-color: var(--border);
}

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

.btn-destructive {
    background-color: var(--destructive);
    color: var(--destructive-foreground);
}

.btn-destructive:hover {
    background-color: #b91c1c;
}

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

.btn-success:hover {
    background-color: #15803d;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(79, 70, 168, 0.2);
}

.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background-color: var(--card);
    color: var(--foreground);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(79, 70, 168, 0.2);
}

/* Cards */
.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

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

.card-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.card-content {
    padding: 1.5rem;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.badge-success {
    background-color: var(--chart-2);
    color: var(--card);
}

.badge-muted {
    background-color: var(--muted);
    color: var(--muted-foreground);
}

.badge-destructive {
    background-color: var(--destructive);
    color: var(--destructive-foreground);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--foreground);
    border-bottom: 1px solid var(--border);
}

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

.table tr:hover {
    background-color: var(--muted);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, rgba(79, 70, 168, 0.9) 50%, rgba(79, 70, 168, 0.8) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZmZmZmYiIGZpbGwtb3BhY2l0eT0iMC4wNSI+PHBhdGggZD0iTTM2IDM0djItSDI0di0yaDEyek0zNiAzMHYySDI0di0yaDEyek0zNiAyNnYySDI0di0yaDEyeiIvPjwvZz48L2c+PC9zdmc+");
    opacity: 0.2;
}

.hero-content {
    position: relative;
    padding: 4rem 1rem;
    text-align: center;
}

.hero-icon {
    width: 5rem;
    height: 5rem;
    background-color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--accent-foreground);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-foreground);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.hero .description {
    color: rgba(255, 255, 255, 0.7);
    max-width: 42rem;
    margin: 0 auto;
}

.hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4rem;
    background: linear-gradient(to top, var(--background), transparent);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 16rem;
    background-color: var(--sidebar);
    color: var(--sidebar-foreground);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.sidebar.open {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    .sidebar {
        position: static;
        transform: translateX(0);
    }
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--sidebar-border);
    height: 4rem;
}

.sidebar-logo {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--sidebar-primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--sidebar-primary-foreground);
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.sidebar-brand-sub {
    font-size: 0.75rem;
    color: rgba(245, 245, 245, 0.7);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(245, 245, 245, 0.8);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background-color: rgba(61, 53, 85, 0.5);
    color: var(--sidebar-foreground);
}

.sidebar-link.active {
    background-color: var(--sidebar-accent);
    color: var(--sidebar-accent-foreground);
}

.sidebar-link svg {
    width: 1.25rem;
    height: 1.25rem;
}

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

.sidebar-user {
    background-color: rgba(61, 53, 85, 0.5);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: rgba(245, 245, 245, 0.7);
}

.sidebar-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--sidebar-border);
    color: var(--sidebar-foreground);
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-logout:hover {
    background-color: var(--sidebar-accent);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .main-content {
        margin-left: 0;
    }
}

.mobile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
    height: 4rem;
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
}

@media (min-width: 1024px) {
    .mobile-header {
        display: none;
    }
}

.menu-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--foreground);
}

.menu-toggle svg {
    width: 1.5rem;
    height: 1.5rem;
}

.page-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .page-content {
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .page-content {
        padding: 2rem;
    }
}

/* Page Header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--foreground);
}

.page-header p {
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.page-header-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .page-header-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-top: 0;
    }
    
    .page-header {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-header-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

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

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.stat-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 1rem;
    height: 1rem;
}

.stat-icon.primary {
    background-color: rgba(79, 70, 168, 0.1);
    color: var(--primary);
}

.stat-icon.accent {
    background-color: rgba(217, 119, 6, 0.2);
    color: var(--accent);
}

.stat-icon.success {
    background-color: rgba(22, 163, 74, 0.2);
    color: var(--success);
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--card-foreground);
}

.stat-value.success {
    color: var(--chart-2);
}

.stat-value.accent {
    color: var(--accent);
}

/* Progress Bar */
.progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-label {
    font-weight: 500;
    color: var(--card-foreground);
}

.progress-value {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.progress-bar {
    height: 0.5rem;
    width: 100%;
    background-color: var(--muted);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 9999px;
    transition: width 0.3s;
}

/* Tabs */
.tabs {
    width: 100%;
}

.tabs-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
    background-color: var(--muted);
    padding: 0.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.tab-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    color: var(--muted-foreground);
    transition: all 0.2s;
}

.tab-trigger:hover {
    color: var(--foreground);
}

.tab-trigger.active {
    background-color: var(--card);
    color: var(--foreground);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-trigger svg {
    width: 1rem;
    height: 1rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Search Input */
.search-container {
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .search-container {
        width: 16rem;
    }
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--muted-foreground);
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    font-size: 0.875rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background-color: var(--background);
}

.search-input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(79, 70, 168, 0.2);
}

/* Filter Row */
.filter-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .filter-row {
        flex-direction: row;
    }
}

.filter-select {
    width: 100%;
}

@media (min-width: 768px) {
    .filter-select {
        width: 12rem;
    }
}

/* Bands Grid */
.bands-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .bands-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.band-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--card-foreground);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Features */
.features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-card {
    display: flex;
    gap: 1rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

.feature-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    background-color: rgba(79, 70, 168, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.feature-content h3 {
    font-weight: 600;
    color: var(--card-foreground);
}

.feature-content p {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Login Card */
.login-card {
    width: 100%;
    max-width: 28rem;
    background-color: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 1.5rem 1.5rem 0.5rem;
}

.login-icon {
    width: 4rem;
    height: 4rem;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.login-icon svg {
    width: 2rem;
    height: 2rem;
    color: var(--primary-foreground);
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

.login-header p {
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.login-form {
    padding: 1.5rem;
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--muted-foreground);
}

.password-toggle:hover {
    color: var(--foreground);
}

.password-toggle svg {
    width: 1rem;
    height: 1rem;
}

/* Landing Layout */
.landing-main {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 3rem 1rem;
}

@media (min-width: 1024px) {
    .landing-main {
        flex-direction: row;
        gap: 4rem;
        align-items: flex-start;
    }
}

.landing-features {
    flex: 1;
}

.landing-features h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 2rem;
}

.landing-bands {
    margin-top: 2.5rem;
}

.landing-bands h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.landing-login {
    width: 100%;
}

@media (min-width: 1024px) {
    .landing-login {
        width: auto;
        min-width: 400px;
    }
}

/* Footer */
.footer {
    background-color: var(--card);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Modal/Dialog */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 28rem;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.open .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
}

.modal-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    display: none;
}

.sidebar-overlay.open {
    display: block;
}

@media (min-width: 1024px) {
    .sidebar-overlay {
        display: none !important;
    }
}

/* Close Button */
.close-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--sidebar-foreground);
    margin-left: auto;
}

@media (min-width: 1024px) {
    .close-btn {
        display: none;
    }
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.2);
    color: var(--success);
}

.alert-error {
    background-color: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--destructive);
}

/* Utility Classes */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-medium {
    font-weight: 500;
}

.text-sm {
    font-size: 0.875rem;
}

.text-muted {
    color: var(--muted-foreground);
}

.mt-2 {
    margin-top: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
