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

/* ==========================================================================
   TrimMyTime Custom Styles: Expressive Minimalism
   ========================================================================== */

/* Base Variables - Hyper-Tactile Spatial */
:root {
    --ut-primary: #4F46E5;    /* Electric Indigo */
    --ut-primary-dark: #4338CA;
    --ut-surface: rgba(255, 255, 255, 0.7); /* Frosted Glass */
    --ut-text: #475569;       /* Slate */
    --ut-heading: #020617;    /* Obsidian */
    --ut-bg: #FCFCFD;         /* Ghost White */
    --ut-bottom-nav-bg: rgba(255, 255, 255, 0.9);
    --ut-border: rgba(15, 23, 42, 0.05); /* Outer micro-border */
    --ut-highlight: rgba(255, 255, 255, 0.8); /* Inner micro-border */
}

/* Typography Architecture & Fixes */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    background-color: var(--ut-bg);
    color: var(--ut-text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    position: relative;
    /* Browser Fallbacks */
    -webkit-user-select: auto;
    user-select: auto;
    text-align: match-parent;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    
    /* Faint CSS Noise/Grain overlay for premium paper tactile feel - opacity reduced to 0.015 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.015'/%3E%3C/svg%3E");
    background-attachment: fixed;
}

/* Ambient Studio Lighting Mesh */
body::before {
    content: '';
    position: fixed;
    top: -10%; left: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, #EEF2FF 0%, transparent 60%);
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
}
body::after {
    content: '';
    position: fixed;
    bottom: -10%; right: -10%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, #FFF0E6 0%, transparent 60%);
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--ut-heading) !important;
    letter-spacing: -0.02em;
}

/* Utility Metadata */
.ut-meta-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ut-text);
    font-weight: 600;
}

.text-muted {
    color: #94A3B8 !important; /* Slate 400 */
}

/* Hyper-Tactile Glassmorphism Containers */
.shadow, .shadow-sm, .shadow-1-strong, .shadow-2-strong, .shadow-3-strong {
    box-shadow: none !important;
}

.card, .ut-card-app, .modal-content {
    border-radius: 12px !important;
    background-color: var(--ut-surface) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--ut-border) !important;
    box-shadow: inset 0 1px 0 var(--ut-highlight), 0 4px 6px -1px rgba(0, 0, 0, 0.02) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ut-card-app:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 var(--ut-highlight), 0 10px 15px -3px rgba(0, 0, 0, 0.03) !important;
}

/* Navigation Overrides */
.navbar {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ut-border);
    box-shadow: inset 0 -1px 0 var(--ut-highlight) !important;
}

/* Physics-Based Frictionless Buttons */
.btn {
    border-radius: 8px !important; 
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none; 
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.btn-primary {
    background-color: var(--ut-primary) !important;
    border: 1px solid var(--ut-primary-dark) !important;
    color: #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus {
    transform: scale(1.02);
    background-color: var(--ut-primary-dark) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

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

.btn-outline-primary {
    color: var(--ut-primary) !important;
    border-color: var(--ut-primary) !important;
}
.btn-outline-primary:hover {
    background-color: var(--ut-primary) !important;
    color: #ffffff !important;
}

.nav-pills .nav-link.active {
    background-color: var(--ut-primary) !important;
    color: #ffffff !important;
    border-radius: 0.25rem !important;
}

/* Bottom Navigation (Barber App) */
.ut-bottom-nav {
    background-color: var(--ut-bottom-nav-bg);
    border-top: 1px solid var(--ut-border);
    padding-bottom: env(safe-area-inset-bottom);
}
.ut-bottom-nav .nav-link {
    color: #757575;
    flex-direction: column;
    font-size: 0.75rem;
    padding: 0.5rem 0;
}
.ut-bottom-nav .nav-link.active {
    color: var(--ut-primary);
}
.ut-bottom-nav i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

/* Indented Channel Inputs */
.form-outline .form-control {
    border-radius: 8px;
    background-color: rgba(241, 245, 249, 0.5) !important;
    border: 1px solid transparent !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02) !important;
    transition: all 0.15s ease-out;
}
.form-outline .form-control:focus, .form-outline .form-control.active {
    background-color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3) !important;
    transform: translateY(-1px);
}
.form-outline .form-notch .form-notch-leading,
.form-outline .form-notch .form-notch-trailing {
    /* Hide native MDBootstrap borders */
    border: none !important;
}
.form-outline .form-notch .form-notch-middle { border: none !important; }

/* Reactive Tables */
.table {
    border-collapse: separate;
    border-spacing: 0;
}
.table > :not(caption) > * > * {
    border-bottom-width: 1px;
    border-bottom-color: rgba(15, 23, 42, 0.05);
}
.table th {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ut-text);
    border-bottom: 2px solid rgba(15, 23, 42, 0.05);
}
.table tbody tr {
    transition: background 0.2s ease;
}
.table tbody tr:hover {
    background: radial-gradient(circle at center, rgba(79, 70, 229, 0.04), transparent);
}

/* Resin Badges */
.badge {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.4em 0.8em;
}
.badge-success {
    background-color: #ECFDF5 !important;
    color: #065F46 !important;
    border: 1px solid #34D399;
}
.badge-warning {
    background-color: #FFFBEB !important;
    color: #92400E !important;
    border: 1px solid #FCD34D;
}

/* Custom Overrides */
.ut-profile-header {
    height: 150px;
    background: var(--ut-surface);
    border-bottom: 1px solid var(--ut-border);
}
.ut-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--ut-bg);
    margin-top: -50px;
    background-color: var(--ut-bg);
}

.toast-container { z-index: 1060; }
.pb-safe { padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important; }

/* ERP Layout Styles */
.erp-sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--ut-border);
    z-index: 1040;
    padding-top: 70px;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
}
.erp-sidebar .nav-link {
    color: var(--ut-text);
    padding: 0.8rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    margin-right: 1rem;
    margin-left: 0.5rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}
.erp-sidebar .nav-link:hover {
    background-color: rgba(15, 23, 42, 0.03);
}
.erp-sidebar .nav-link.active {
    color: var(--ut-primary-dark);
    background-color: rgba(79, 70, 229, 0.1);
    border-left: 2px solid var(--ut-primary);
}
.erp-main-content {
    margin-left: 260px;
    padding-top: 80px; 
    padding-bottom: 30px;
    min-height: 100vh;
    transition: margin-left 0.3s ease-in-out;
}

@media (max-width: 991.98px) {
    .erp-sidebar { transform: translateX(-100%); }
    .erp-sidebar.show {
        transform: translateX(0);
        box-shadow: 1px 0 0 var(--ut-border) !important;
    }
    .erp-main-content { margin-left: 0; }
}



/* Hyper-Tactile Skeleton Shimmer */
.ut-skeleton {
    background: #F1F5F9;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.ut-skeleton::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Pure CSS Fade-in */
.fade-in {
    animation: fadeInAnimation 0.6s ease-out forwards;
}

@keyframes fadeInAnimation {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

