/* Dashboard CSS - Extracted from index.blade.php for CSP compliance */

/* Custom styles untuk glassmorphism dan theme support */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background 0.3s ease;
}

/* Light mode styles */
body.light {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Dark mode styles */
body.dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Auto mode will use system preference via CSS media query */
@media (prefers-color-scheme: dark) {
    body.auto:not(.light):not(.dark) {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
}

@media (prefers-color-scheme: light) {
    body.auto:not(.light):not(.dark) {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
}

/* Glassmorphism styles */
.glassmorphism {
    transition: all 0.3s ease;
}

body.light .glassmorphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark .glassmorphism {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Auto mode styles - PRIORITAS TINGGI */
body.auto:not(.light):not(.dark) .glassmorphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (prefers-color-scheme: dark) {
    body.auto:not(.light):not(.dark) .glassmorphism {
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.glassmorphism-light {
    transition: all 0.3s ease;
}

body.light .glassmorphism-light {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark .glassmorphism-light {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Auto mode untuk glassmorphism-light */
body.auto:not(.light):not(.dark) .glassmorphism-light {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
    body.auto:not(.light):not(.dark) .glassmorphism-light {
        background: rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
}

.service-card {
    transition: all 0.3s ease;
}

body.light .service-card {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark .service-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Auto mode untuk service-card */
body.auto:not(.light):not(.dark) .service-card {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
    body.auto:not(.light):not(.dark) .service-card {
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
}

body.light .service-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

body.dark .service-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Auto mode untuk service-card hover */
body.auto:not(.light):not(.dark) .service-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

@media (prefers-color-scheme: dark) {
    body.auto:not(.light):not(.dark) .service-card:hover {
        background: rgba(0, 0, 0, 0.5);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    }
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content-custom {
    transition: all 0.3s ease;
}

body.light .modal-content-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark .modal-content-custom {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Auto mode untuk modal-content-custom */
body.auto:not(.light):not(.dark) .modal-content-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (prefers-color-scheme: dark) {
    body.auto:not(.light):not(.dark) .modal-content-custom {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.modal-input-custom {
    transition: all 0.3s ease;
}

body.light .modal-input-custom,
body.auto:not(.dark):not(.light) .modal-input-custom {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

body.dark .modal-input-custom {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.light .modal-input-custom:focus,
body.auto:not(.dark):not(.light) .modal-input-custom:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

body.dark .modal-input-custom:focus {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.confirm-btn-custom {
    transition: all 0.3s ease;
}

body.light .confirm-btn-custom,
body.auto:not(.dark):not(.light) .confirm-btn-custom {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
}

body.dark .confirm-btn-custom {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.light .confirm-btn-custom:hover,
body.auto:not(.dark):not(.light) .confirm-btn-custom:hover {
    background: white;
    transform: translateY(-2px);
}

body.dark .confirm-btn-custom:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.cancel-btn-custom {
    transition: all 0.3s ease;
}

body.light .cancel-btn-custom,
body.auto:not(.dark):not(.light) .cancel-btn-custom {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.dark .cancel-btn-custom {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.light .cancel-btn-custom:hover,
body.auto:not(.dark):not(.light) .cancel-btn-custom:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.dark .cancel-btn-custom:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Theme selector styles */
.theme-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    transition: all 0.3s ease;
}

body.dark .theme-selector {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Auto mode untuk theme-selector */
body.auto:not(.light):not(.dark) .theme-selector {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (prefers-color-scheme: dark) {
    body.auto:not(.light):not(.dark) .theme-selector {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.theme-option {
    padding: 8px 12px;
    margin: 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    border: none;
    background: transparent;
    color: white;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-option.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

body.dark .theme-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.dark .theme-option.active {
    background: rgba(255, 255, 255, 0.1);
}

/* Text shadow for better readability */
body.dark h1,
body.dark .text-white {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.light h1,
body.auto:not(.dark):not(.light) h1 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Utility class to replace inline style="text-shadow: ..." */
.text-shadow-custom {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
