/* Component Styles - Cards, Buttons, Forms, Tabs, Navigation, Modals */

/* Navigation Tabs */
@media (min-width: 1025px) {
    .tabs {
        display: none;
    }
}

.tabs-container {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    min-width: min-content;
}

.tab {
    padding: 0.625rem 1rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 2.75rem;
}

.tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

@media (min-width: 768px) {
    .tab {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .card {
        padding: 1.5rem;
        margin-bottom: 1.25rem;
        border-radius: 1rem;
    }
}

.card:hover {
    box-shadow: var(--shadow);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    font-family: 'Inter', sans-serif;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

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

.btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
}

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

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    min-height: 2.75rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

select.form-input {
    cursor: pointer;
}

textarea.form-input {
    resize: vertical;
    min-height: 7.5rem;
    font-family: 'Inter', sans-serif;
}

/* Auth Components */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
}

.auth-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 26.25rem;
    width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .auth-card {
        padding: 2.5rem;
        border-radius: 1.25rem;
    }
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
        gap: 1rem;
        margin-bottom: 1.875rem;
    }
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    padding: 1.25rem;
    border-radius: 0.75rem;
    color: white;
    transition: transform 0.2s ease;
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.stat-card:hover {
    transform: translateY(-0.125rem);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .stat-value {
        font-size: 2rem;
    }
}

.stat-label {
    font-size: 0.8125rem;
    opacity: 0.9;
}

/* Note Item */
.note-item {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .note-item {
        padding: 1.25rem;
    }
}

.note-item:hover {
    transform: translateX(0.25rem);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.note-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.note-content {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Attendance Specific */
.attendance-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--danger);
}

/* Timer Display */
.timer-display {
    font-size: 56px;
    font-weight: 800;
    margin: 40px 0;
    font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (min-width: 768px) {
    .timer-display {
        font-size: 72px;
    }
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

/* Messages */
.error {
    color: var(--danger);
    background: var(--danger-light);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid var(--danger);
}

.success {
    color: var(--success);
    background: var(--success-light);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid var(--success);
}

.info {
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid var(--primary);
}

.warning-dark {
    color: #92400e;
}

.warning-light {
    background: #fef3c7;
}

.success-light {
    background: #dcfce7;
}