/**
 * MT System - Modern Responsive CSS
 * Features: Dark/Light mode, Responsive design
 */

/* ========== CSS Variables ========== */
:root {
    /* Light Mode Colors */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    --secondary-color: #94a3b8;
    --success-color: #34d399;
    --danger-color: #f87171;
    --warning-color: #fbbf24;
    --info-color: #60a5fa;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --border-color: #334155;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}

/* ========== Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
}

/* Custom scrollbar for the entire page */
body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
    border: 2px solid var(--bg-primary);
}

body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ========== Container ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* ========== Navigation ========== */
.navbar {
    background-color: var(--bg-primary);
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.nav-menu > * {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.nav-user {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Hamburger Toggle Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-toggle:hover span {
    background-color: var(--primary-color);
}

/* Hamburger Animation - X */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}


/* ========== Authentication Pages ========== */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ========== Forms ========== */
.auth-form,
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 11px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: var(--bg-primary);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.required {
    color: var(--danger-color);
    margin-left: 2px;
}

/* ========== Buttons ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    white-space: nowrap;
}

.btn svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
    transform: translateY(-1px);
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--bg-secondary);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.875rem;
}

.btn-sm svg {
    width: 16px !important;
    height: 16px !important;
}

.btn-icon {
    padding: 8px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-icon svg {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    display: block;
}

.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========== Theme Toggle ========== */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

.btn-theme {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 10px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Specific styles for auth pages */
.auth-card .btn-theme {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Removed conflicting icon visibility rules */

[data-theme="dark"] .btn-theme {
    background: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-theme:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-theme:hover .theme-icon {
    color: white !important;
}

/* Theme icon styles moved to theme-fix.css */

/* Removed theme icon rules to prevent conflicts */

/* ========== Alerts ========== */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    font-size: 0.95rem;
    border-left: 4px solid;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    animation: slideInDown 0.3s ease-out;
}

.alert-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
}

.alert.alert-dismissing {
    animation: slideOutUp 0.3s ease-out forwards;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-link {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* ========== Dashboard ========== */
.dashboard-wrapper {
    padding: 24px 0;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========== Profile ========== */
.profile-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-grid-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .profile-grid-top {
        grid-template-columns: 350px 1fr;
    }
}

.profile-card-full {
    width: 100%;
    grid-column: 1 / -1;
}

.profile-card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 30px;
}

.profile-picture-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.profile-picture-wrapper {
    width: 200px;
    height: 200px;
    border-radius: 50%; /* Circular profile picture */
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 4px solid white;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-picture-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.profile-picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.profile-picture-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Profile picture helper text */
.profile-picture-section small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-top: -0.5rem;
    text-align: center;
    max-width: 80%;
}

.profile-info-summary {
    text-align: center;
    padding-top: 20px;
}

.profile-info-summary h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
    word-wrap: break-word;
}

.user-type-badge {
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.form-actions {
    margin-top: 10px;
}

/* ========== Stats Grid ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-card:hover::before {
    width: 6px;
}

.stat-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: var(--border-radius-lg);
    color: white;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-info h3 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 4px;
    font-weight: 700;
    line-height: 1;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}

/* ========== Card ========== */
.card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 2px solid var(--border-color);
    background-color: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header-left {
    flex: 0 0 auto;
}

.card-header h2 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

.card-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Action Buttons Section */
.action-buttons-section {
    padding: 20px 24px;
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
}

.button-group {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.group-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button-row .btn {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.button-row .btn span {
    white-space: nowrap;
}

.button-row .btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Excel Button Special Styling */
.btn-excel {
    background-color: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
}

.btn-excel:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Button hover effects */
.button-row .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.button-row .btn:active {
    transform: translateY(0);
}

/* Responsive adjustments for action buttons */
@media (max-width: 768px) {
    .action-buttons-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .button-row {
        flex-direction: column;
    }
    
    .button-row .btn {
        width: 100%;
        min-width: unset;
    }
    
    .action-buttons-section {
        padding: 16px;
    }
}

.search-box {
    position: relative;
    min-width: 250px;
    max-width: 350px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-box svg {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px !important;
    height: 18px !important;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

/* ========== Table ========== */
.table-responsive {
    overflow-x: auto;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
    margin: 0 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--primary-hover), var(--primary-color));
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.data-table th:nth-child(1),
.data-table td:nth-child(1) {
    width: 50px;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 60px;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 120px;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 200px;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    width: 150px;
}

.data-table th:nth-child(6),
.data-table td:nth-child(6) {
    width: 100px;
}

.data-table th:nth-child(7),
.data-table td:nth-child(7) {
    width: 140px;
}

.data-table th:nth-child(8),
.data-table td:nth-child(8) {
    width: 120px;
}

.data-table th:nth-child(9),
.data-table td:nth-child(9) {
    width: 110px;
}

.data-table th:nth-child(10),
.data-table td:nth-child(10) {
    width: 240px;
    min-width: 240px;
}

.data-table thead {
    background-color: var(--bg-secondary);
}

.data-table thead tr {
    border-bottom: 2px solid var(--border-color);
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table th {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.data-table td {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: var(--bg-secondary);
    cursor: default;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.table-profile-pic {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.table-profile-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
}

.table-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    white-space: nowrap;
    vertical-align: middle;
    min-width: 220px;
    padding: 8px 4px;
}

.table-actions form {
    margin: 0;
    padding: 0;
    display: inline-flex;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-primary {
    background-color: rgba(79, 70, 229, 0.15);
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.badge-secondary {
    background-color: rgba(100, 116, 139, 0.15);
    color: var(--secondary-color);
    border: 1.5px solid var(--secondary-color);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

/* ========== Modal ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    padding: 0;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s ease-out;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 24px 30px;
    border-bottom: 2px solid var(--border-color);
    background-color: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-body {
    padding: 30px;
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: calc(90vh - 180px);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
}

.modal-close:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.user-detail-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.user-detail-item {
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.user-detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.user-detail-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ========== Responsive Design ========== */
@media (max-width: 968px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-box {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 968px) {
    /* Show hamburger toggle */
    .nav-toggle {
        display: flex;
    }
    
    /* Collapsible menu */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        border-top: 2px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        padding: 20px;
        gap: 12px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s ease-in-out;
    }
    
    /* Show menu when active */
    .nav-menu.active {
        max-height: 400px;
        opacity: 1;
        padding: 20px;
    }
    
    .nav-user {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px;
        background-color: var(--bg-secondary);
        border-radius: var(--border-radius);
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .nav-menu .btn {
        width: 100%;
        justify-content: center;
    }
    
    .nav-menu .btn-theme {
        width: 100%;
        border-radius: var(--border-radius);
        height: 48px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        gap: 0;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .profile-card {
        padding: 20px;
    }
    
    .profile-picture-wrapper {
        width: 160px;
        height: 160px;
        border-width: 3px;
    }
    
    .upload-options {
        gap: 0.75rem;
    }
    
    .upload-options .btn {
        min-width: 140px;
        padding: 0.6rem 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .table-actions {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
        min-width: 180px;
        padding: 6px 2px;
    }
    
    .table-actions .btn-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        padding: 6px;
    }
    
    .table-actions .btn-icon svg {
        width: 16px !important;
        height: 16px !important;
    }
}

@media (max-width: 768px) {
    .modal-content {
        max-height: 92vh;
    }
    
    .modal-body {
        max-height: calc(92vh - 170px);
    }
}

@media (max-width: 480px) {
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .stat-info h3 {
        font-size: 1.8rem;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(95vh - 160px);
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-footer {
        padding: 16px 20px;
        flex-wrap: wrap;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .table-actions {
        gap: 3px;
        min-width: 160px;
        padding: 4px 1px;
    }
    
    .table-actions .btn-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        padding: 5px;
    }
    
    .table-actions .btn-icon svg {
        width: 14px !important;
        height: 14px !important;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .modal,
    .theme-toggle {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ========== Upload Form ========== */
.upload-form {
    text-align: center;
}

.upload-form small {
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
}

/* ========== Loading Overlay ========== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-secondary);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Smooth transitions for all interactive elements */
button, a, input, select, textarea {
    transition: var(--transition);
}

/* Focus visible for accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========== Positions Table Styles ========== */
.positions-table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    border-radius: 8px;
    background-color: var(--bg-card);
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.positions-table-container::-webkit-scrollbar {
    height: 8px;
}

.positions-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.positions-table-container::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 4px;
}

.positions-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

.positions-table {
    width: 100%;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    font-size: 0.95rem;
}

.positions-table th,
.positions-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.positions-table th {
    background-color: rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.positions-table th:first-child {
    border-top-left-radius: 8px;
}

.positions-table th:last-child {
    border-top-right-radius: 8px;
}

.positions-table tr:last-child td {
    border-bottom: none;
}

.positions-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.positions-table .text-center {
    text-align: center;
}

.positions-table .actions {
    white-space: nowrap;
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.inactive {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Position section specific styles */
.position-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.add-position-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    border-radius: 6px;
    background-color: var(--primary-color);
    transition: all 0.2s ease;
}

.add-position-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.add-position-btn svg {
    stroke-width: 2.5;
}

/* Table action buttons */
.positions-table .actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    white-space: nowrap;
    vertical-align: middle;
}

.positions-table .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.positions-table .btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ========== Pagination Styles ========== */
.pagination-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    padding: 20px;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.pagination-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-numbers .btn {
    min-width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.page-ellipsis {
    padding: 0 8px;
    color: var(--text-muted);
    font-weight: 500;
    user-select: none;
}

.pagination-settings {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pagination-settings label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 80px;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Loading indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-container {
        padding: 16px;
        gap: 12px;
    }
    
    .pagination-controls {
        gap: 8px;
    }
    
    .page-numbers {
        gap: 4px;
    }
    
    .page-numbers .btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    
    .pagination-settings {
        flex-direction: column;
        gap: 4px;
    }
    
    .form-select {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .pagination-container {
        padding: 12px;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .page-numbers {
        order: 2;
    }
    
    .pagination-controls .btn {
        order: 1;
        width: 100%;
        max-width: 120px;
    }
    
    .pagination-controls .btn:last-child {
        order: 3;
    }
}
.upload-instructions {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.upload-instructions h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.upload-instructions ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.upload-instructions li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.template-download {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.upload-progress {
    background: var(--info-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 1rem 0;
    font-weight: 500;
}

.upload-results {
    margin: 1rem 0;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid;
}

.upload-results.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.upload-results.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.upload-results h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.summary-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-value.success {
    color: var(--success-color);
}

.summary-value.error {
    color: var(--danger-color);
}

.errors-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.errors-list h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.errors-list ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.errors-list li {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

/* File input styling */
input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Responsive adjustments for bulk upload */
@media (max-width: 768px) {
    .upload-instructions {
        padding: 1rem;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .upload-instructions {
        padding: 0.75rem;
    }
    
    .upload-results {
        padding: 1rem;
    }
    
    .summary-item {
        padding: 0.75rem;
    }
    
    .profile-picture-wrapper {
        width: 140px;
        height: 140px;
        border-width: 2px;
    }
    
    .profile-picture-placeholder {
        font-size: 3rem;
    }
    
    .upload-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .upload-options .btn {
        width: 100%;
        min-width: 0;
        max-width: 200px;
    }
}

/* ========== Admin Profile View Styles ========== */
.profile-details-readonly {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.detail-row label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.detail-row span {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
}

/* Responsive adjustments for admin profile view */
@media (max-width: 768px) {
    .detail-row {
        padding: 0.5rem;
    }
    
    .detail-row label {
        font-size: 0.8rem;
    }
    
    .detail-row span {
        font-size: 0.9rem;
    }
}

/* Dark mode adjustments for admin profile view */
[data-theme="dark"] .detail-row {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .detail-row label {
    color: var(--text-secondary);
}

[data-theme="dark"] .detail-row span {
    color: var(--text-primary);
}

/* ========== Camera Modal Styles ========== */
.camera-modal-content {
    max-width: 600px;
    width: 90vw;
    max-height: 90vh;
}

.camera-modal-body {
    padding: 1.5rem;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 2px solid var(--border-color);
    aspect-ratio: 4/3;
}

#cameraVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: #000;
}

/* Camera overlay for mobile */
.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.camera-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
}

.frame-corners {
    position: relative;
    width: 100%;
    height: 100%;
}

.frame-corners .corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #fff;
}

.frame-corners .top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.frame-corners .top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.frame-corners .bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.frame-corners .bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.camera-controls .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.capture-btn {
    background-color: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: white !important;
    font-weight: 600;
    min-width: 160px;
}

.capture-btn:hover {
    background-color: var(--success-hover) !important;
    border-color: var(--success-hover) !important;
}

#capturedImageContainer {
    text-align: center;
    margin: 1.5rem 0;
}

#capturedImageContainer h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

#capturedImage {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.capture-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

#cameraError {
    margin-top: 1rem;
}

/* Upload options styling */
.upload-options {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 400px;
}

.upload-options .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 160px;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.upload-options .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.upload-options .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-options .btn svg {
    width: 20px;
    height: 20px;
}

.upload-options .btn-secondary {
    background-color: #f5f5f5;
    border-color: #eeeeee;
    color: #555;
}

.upload-options .btn-secondary:hover {
    background-color: #eeeeee;
    border-color: #e0e0e0;
}

.upload-options .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.upload-options .btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.upload-options .delete-form {
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.upload-options .btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.upload-options .btn-danger:hover {
    background-color: #d32f2f;
    border-color: #d32f2f;
}

/* Loading animation for save button */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive camera modal */
@media (max-width: 768px) {
    .camera-modal-content {
        width: 95vw;
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .camera-modal-body {
        padding: 1rem;
    }
    
    .camera-container {
        max-width: 100%;
        margin-bottom: 1rem;
        aspect-ratio: 3/4; /* Portrait aspect ratio for mobile */
    }
    
    .camera-controls {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .camera-controls .btn {
        width: 100%;
        max-width: 250px;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .capture-btn {
        min-width: 200px;
        padding: 1.2rem;
        font-size: 1.1rem;
    }
    
    .upload-options {
        flex-direction: column;
        width: 100%;
    }
    
    .upload-options .btn {
        width: 100%;
        max-width: 200px;
    }
    
    /* Hide frame corners on very small screens */
    .frame-corners .corner {
        width: 20px;
        height: 20px;
        border-width: 2px;
    }
}

@media (max-width: 480px) {
    .camera-modal-content {
        width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .camera-container {
        margin-bottom: 0.75rem;
        aspect-ratio: 4/5; /* More portrait-like for small phones */
    }
    
    .camera-controls {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .camera-controls .btn {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .capture-btn {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .capture-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .capture-actions .btn {
        width: 100%;
        max-width: 200px;
    }
    
    /* Smaller frame corners for very small screens */
    .frame-corners .corner {
        width: 15px;
        height: 15px;
        border-width: 1.5px;
    }
    
    .camera-frame {
        width: 85%;
        height: 85%;
    }
}


