/* 
   Premium UI/UX Theme - BDO Record & Marketing 
   Powered by Vanilla CSS & HSL Logic
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Primary Accent (Dynamic HSL) */
    --p-h: 220; /* Default Hue: Blue */
    --p-s: 90%;
    --p-l: 55%;
    
    --primary: hsl(var(--p-h), var(--p-s), var(--p-l));
    --primary-light: hsl(var(--p-h), var(--p-s), 95%);
    --primary-dark: hsl(var(--p-h), var(--p-s), 35%);
    --primary-soft: hsla(var(--p-h), var(--p-s), var(--p-l), 0.15);
    
    /* Common Status Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Layout Constants */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Transition */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(51, 65, 85, 0.5);
    
    --primary-light: hsl(var(--p-h), var(--p-s), 15%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    transition: var(--transition);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 800px; /* Centered for mobile focus */
    margin: 0 auto;
    padding: 0 20px;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Glass Components */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.table tr:hover {
    background: hsla(var(--p-h), var(--p-s), var(--p-l), 0.02);
}

/* Dashboard Grid Items */
.dash-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.dash-item i {
    font-size: 2.2rem;
    margin-bottom: 12px;
    background: var(--primary-soft);
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: var(--primary);
    transition: var(--transition);
}

.dash-item:hover i {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.dash-item span {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

/* Form Styling */
.form-control, .form-select {
    background-color: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 1rem;
    width: 100%;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
    outline: none;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px hsla(var(--p-h), var(--p-s), var(--p-l), 0.3);
}

.btn-primary:active {
    transform: scale(0.96);
}

/* Custom Nav Bar */
.top-nav {
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 20px;
}

/* Mobile Bottom Dock */
.bottom-dock {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 65px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    z-index: 1001;
}

.dock-item {
    color: var(--text-muted);
    font-size: 1.4rem;
    transition: var(--transition);
    padding: 10px;
}

.dock-item.active {
    color: var(--primary);
    transform: translateY(-5px);
}

/* Theme Customizer Sidebar */
.theme-panel {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100%;
    background: var(--bg-card);
    z-index: 2000;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    padding: 30px;
}

.theme-panel.open {
    right: 0;
}

/* Grid System */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.mb-4 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.xsmall { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.opacity-75 { opacity: 0.75; }
.shadow-lg { box-shadow: var(--shadow-lg); }
.border-0 { border: none !important; }
.rounded-pill { border-radius: 50px !important; }

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.bg-success { background: #d1fae5; color: #065f46; }
.bg-primary { background: var(--primary-soft); color: var(--primary); }

@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .dash-item i { width: 55px; height: 55px; font-size: 1.8rem; }
    body { padding-bottom: 100px; }
}