/* Modern Lightbox Theme - Global */

:root {
    --bg: #f8f9fa;
    --bg-light: #ffffff;
    --fg: #1a1a1a;
    --muted: #757575;
    --brand: #0ea5e9;
    --brand-light: #e0f2fe;
    --card: #ffffff;
    --line: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4f8 100%);
    color: var(--fg);
    min-height: 100vh;
}

/* Header */
.header, .navbar, header {
    background: linear-gradient(135deg, var(--brand) 0%, #06b6d4 100%);
    color: white;
    padding: 28px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.header h1, .navbar h1, header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header p, .navbar p, header p {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 500;
}

.header-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Buttons */
.btn, button {
    padding: 11px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}

.btn-primary, button[type="submit"], .btn-submit {
    background: linear-gradient(135deg, var(--brand) 0%, var(--info) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover, button[type="submit"]:hover, .btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(14, 165, 233, 0.4);
}

.btn-primary:active, button[type="submit"]:active, .btn-submit:active {
    transform: translateY(-1px);
}

.btn-secondary, .btn-cancel {
    background: var(--line);
    color: var(--fg);
}

.btn-secondary:hover, .btn-cancel:hover {
    background: var(--muted);
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Cards */
.card, .panel, .box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.card:hover, .panel:hover, .box:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-light);
}

.card::before, .panel::before, .box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand) 0%, var(--info) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::before, .panel:hover::before, .box:hover::before {
    opacity: 1;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--fg);
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand);
    background: #f0f9ff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-group input::placeholder {
    color: var(--muted);
}

/* Modal */
.modal, .dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

.modal.show, .dialog.show {
    opacity: 1;
    visibility: visible;
}

.modal-content, .dialog-content {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content, .dialog.show .dialog-content {
    transform: scale(1) translateY(0);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header, .dialog-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2, .dialog-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--brand) 0%, var(--info) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close, .dialog-close {
    background: var(--brand-light);
    color: var(--brand);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
}

.modal-close:hover, .dialog-close:hover {
    background: var(--brand);
    color: white;
    transform: rotate(90deg);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}

.badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.badge-warning {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #92400e;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.badge-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

table thead {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

table th {
    padding: 14px;
    text-align: left;
    font-weight: 700;
    color: var(--brand);
    border-bottom: 2px solid var(--line);
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

table td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    color: var(--fg);
    font-size: 14px;
}

table tbody tr {
    transition: all 0.2s;
}

table tbody tr:hover {
    background: var(--brand-light);
}

/* Alert Messages */
.alert, .message {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Text Styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

h1 { font-size: 32px; }
h2 { font-size: 28px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

small {
    font-size: 12px;
    color: var(--muted);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
    }

    .header-right {
        width: 100%;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .modal-content, .dialog-content {
        padding: 24px;
    }

    .container {
        padding: 20px;
    }

    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* Loading Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading, .spinner {
    animation: spin 1s linear infinite;
}
