/* Base */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Sidebar toggle for mobile */
@media (max-width: 768px) {
    .sidebar-open .sidebar-overlay {
        display: block;
    }
    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }
}

/* Search results */
#searchResults .search-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s;
}
#searchResults .search-item:hover {
    background: #f9fafb;
}
#searchResults .search-item:last-child {
    border-bottom: none;
}

/* Notifications */
#notifList .notif-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
}
#notifList .notif-item.unread {
    background: #eff6ff;
}

/* Animated gradient */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

/* Floating shapes */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}
@keyframes floatDelayed {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(-3deg); }
    66% { transform: translateY(5px) rotate(2deg); }
}
@keyframes floatSlow {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-delayed { animation: floatDelayed 8s ease-in-out infinite; }
.animate-float-slow { animation: floatSlow 10s ease-in-out infinite; }

/* Glass card */
.glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Fade in animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}
.animate-fade-in-delayed {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

/* Progress bar */
.progress-bar {
    transition: width 0.6s ease;
    border-radius: 999px;
}

/* Print */
@media print {
    .app-sidebar, .app-header, .app-footer, .no-print { display: none !important; }
    .app-main { margin-left: 0 !important; padding: 0 !important; }
}

/* Card fade in */
.card-animate {
    animation: fadeInUp 0.3s ease-out;
}

/* Sidebar transition */
.app-sidebar {
    transition: transform 0.3s ease;
}

/* ---- Form Elements ---- */

/* Text inputs, textareas, selects */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="url"],
input[type="search"],
input[type="tel"],
textarea,
select {
    width: 100% !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    color: #111827 !important;
    background-color: #fff !important;
    transition: all 0.15s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
    min-height: calc(1.5em + 1rem + 2px) !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
    background-color: #fff !important;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
input[type="url"]:hover,
input[type="search"]:hover,
input[type="tel"]:hover,
textarea:hover,
select:hover {
    border-color: #9ca3af !important;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.5rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 2.5rem !important;
}

/* Labels (only those directly before an input/select/textarea — not checkbox/radio labels) */
label:has(+ input:not([type="checkbox"]):not([type="radio"])),
label:has(+ select),
label:has(+ textarea) {
    display: block !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 0.375rem !important;
    letter-spacing: 0.01em !important;
}

/* Checkboxes & Radios */
input[type="checkbox"],
input[type="radio"] {
    width: 1.125rem !important;
    height: 1.125rem !important;
    border-radius: 0.25rem !important;
    border: 1.5px solid #d1d5db !important;
    accent-color: #6366f1 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    border-color: #6366f1 !important;
}

/* File inputs */
input[type="file"]::file-selector-button {
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem !important;
    border: none !important;
    background-color: #eef2ff !important;
    color: #4f46e5 !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
    margin-right: 0.75rem !important;
}

input[type="file"]::file-selector-button:hover {
    background-color: #e0e7ff !important;
}

/* Disabled */
input:disabled,
textarea:disabled,
select:disabled {
    background-color: #f9fafb !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    border-style: dashed !important;
}

/* Error state (is-invalid) */
input.is-invalid,
textarea.is-invalid,
select.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Multiple select */
select[multiple] {
    padding: 0.25rem !important;
    background-image: none !important;
}

select[multiple] option {
    padding: 0.375rem 0.625rem !important;
    border-radius: 0.25rem !important;
}

select[multiple] option:checked {
    background-color: #eef2ff !important;
    color: #4338ca !important;
}


