/* Custom Global Styles & Design System */

:root {
    --transition-speed: 0.3s;
    
    /* Light Mode - Slate & Yellow/Gold Harmonized Palette */
    --color-bg-base: #f8fafc;
    --color-bg-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-text-primary: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
    
    --color-brand-primary: #eab308; /* Yellow 500 */
    --color-brand-hover: #ca8a04; /* Yellow 600 */
    
    --color-success: #10b981; /* Emerald 500 */
    --color-danger: #f43f5e; /* Rose 500 */
    --color-warning: #f59e0b; /* Amber 500 */
    --color-info: #3b82f6; /* Blue 500 */
}

.dark {
    /* Dark Mode - Dark Slate/Indigo & Yellow Gold Palette */
    --color-bg-base: #0f172a;
    --color-bg-surface: #1e293b;
    --color-border: #334155;
    --color-text-primary: #f8fafc;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
}

/* Base resets & custom fonts */
body {
    background-color: var(--color-bg-base);
    color: var(--color-text-primary);
    transition: background-color var(--transition-speed), border-color var(--transition-speed), color var(--transition-speed);
}

/* Card glassmorphism and modern layout cards */
.card {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    transition: background-color var(--transition-speed), border-color var(--transition-speed), transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
}

/* Sidebar Tab Styling */
.tab-btn {
    color: var(--color-text-secondary);
    border: 1px solid transparent;
}

.tab-btn:hover {
    background-color: rgba(234, 179, 8, 0.05);
    color: var(--color-brand-hover);
}

.tab-btn.active {
    background-color: var(--color-brand-primary);
    color: #0f172a !important; /* contrast on gold */
    box-shadow: 0 10px 15px -3px rgba(234, 179, 8, 0.2), 0 4px 6px -4px rgba(234, 179, 8, 0.1);
}

.dark .tab-btn.active {
    background-color: var(--color-brand-primary);
    color: #0f172a !important;
}

/* Mobile Bottom Tab Navigation */
.mobile-tab-btn {
    transition: color 0.2s;
}

.mobile-tab-btn.active {
    color: var(--color-brand-primary) !important;
}

/* Custom inputs styling */
input, select, textarea {
    background-color: transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-brand-primary) !important;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
}

/* Tab view panels */
.tab-view {
    display: none;
    animation: fade-in 0.3s ease-out forwards;
}

.tab-view.active {
    display: block;
}

/* Keyframe animations */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scale-up {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-slide-up {
    animation: slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-up {
    animation: scale-up 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* Modal Overlay Styling */
.modal-overlay {
    transition: opacity 0.2s ease-out;
}

/* Custom Toast Alerts */
.toast {
    animation: slide-in-right 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slide-in-right {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Smooth Table Styling */
table {
    border-spacing: 0 0.5rem;
    border-collapse: separate;
}

tr {
    background-color: transparent;
}

/* Custom Status Badges */
.status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.status-active {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-danger {
    background-color: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.2);
}
