* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --primary-hover: #5a67d8;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --bg-color: #f7fafc;
    --card-bg: #ffffff;
    --text-color: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
    --bg-color: #1a202c;
    --card-bg: #2d3748;
    --text-color: #f7fafc;
    --text-secondary: #a0aec0;
    --border-color: #4a5568;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, #e2e8f0 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.header h1 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--danger-color);
    background: var(--danger-color);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #e53e3e);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #38a169);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 25px 30px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: var(--danger-color);
    background: rgba(245, 101, 101, 0.1);
}

.modal-body {
    padding: 25px 30px;
}

.modal-footer {
    padding: 15px 30px 25px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.pin-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.pin-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.pin-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.pin-input:disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-body {
    padding: 25px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: block;
    padding: 40px 20px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    text-align: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-color);
}

.file-label:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.file-label.has-file {
    border-color: var(--success-color);
    background: rgba(72, 187, 120, 0.05);
    color: var(--success-color);
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid;
    animation: slideDown 0.3s ease-out;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    transition: all 0.3s ease;
}

.alert:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.alert-error {
    background: #ef4444;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #dc2626;
    color: white;
    border-left-color: #b91c1c;
    font-weight: 600;
}

.alert-success {
    background: #10b981;
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #059669;
    color: white;
    border-left-color: #047857;
    font-weight: 600;
}

.alert-info {
    background: #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #2563eb;
    color: white;
    border-left-color: #1d4ed8;
    font-weight: 600;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .pin-container {
        gap: 10px;
    }
    
    .pin-input {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
    
    .card-actions {
        justify-content: center;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .alert {
        left: 10px;
        right: 10px;
        transform: none;
        min-width: auto;
        max-width: none;
        animation: slideDownMobile 0.3s ease-out;
    }
    
    .alert:hover {
        transform: translateY(-2px);
    }
    
    @keyframes slideDownMobile {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .modal-body, .modal-header, .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .card-body {
        padding: 20px;
    }
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.d-none { display: none; }
.d-flex { display: flex; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.w-full { width: 100%; } 