@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* BLUE THEME SHIFT */
    --primary-color: #2563eb; /* blue-600 */
    --primary-hover: #1d4ed8; /* blue-700 */
    --primary-light: #dbeafe; /* blue-100 */
    --secondary-color: #0ea5e9;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --text-main: #0f172a; 
    --text-muted: #475569; 
    --bg-body: #f8fafc;
    --bg-input: #f1f5f9; 
    --card-bg: #ffffff;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
    --shadow-active: 0 25px 50px -12px rgba(37, 99, 235, 0.15); /* blue shadow */
}

body {
    background-color: var(--bg-body);
    /* Blue/Indigo Gradient */
    background-image: radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.03) 0px, transparent 50%), 
                    radial-gradient(at 100% 0%, rgba(79, 70, 229, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Modal System Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-container, .report-modal-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-float);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    margin: auto;
}

.modal-container { max-width: 640px; }
.report-modal-container { max-width: 1024px; }

.modal-overlay.visible .modal-container,
.modal-overlay.visible .report-modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    flex-shrink: 0;
}

.peco-edit-mode { display: none !important; }
.is-editing .peco-edit-mode { 
    display: block !important; 
    background: #fff;
    padding: 0.5rem;
    border-radius: 0.75rem;
    margin-top: 0.5rem;
}
.is-editing .peco-display-mode { display: none !important; }

.peco-dashboard-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

.is-editing {
    border: 2px solid var(--primary-color) !important;
    background-color: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.15);
    transform: scale(1.01);
    z-index: 50;
}

textarea, input[type="text"], input[type="search"], select, input[type="password"] {
    background-color: var(--bg-input) !important;
    color: var(--text-main) !important;
    border: 1px solid #e2e8f0 !important; 
    transition: all 0.2s ease;
}

textarea:focus, input:focus, select:focus {
    background-color: #ffffff !important;
    border-color: var(--primary-color) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-link:hover:not(.active) {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

.loader {
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: #1e293b;
    color: white;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(1rem);
    transition: 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }