/* Landing Page (Sleek Dark Theme) */
.landing-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: #0f172a; /* Deep slate / off-black base */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(239, 68, 68, 0.05), transparent 25%);
    display: none;
    opacity: 0;
    transition: var(--transition-normal);
    color: #f8fafc; /* Soft white text */
}

.landing-page.active {
    display: block;
    opacity: 1;
    pointer-events: all;
    animation: fadeIn 0.4s ease forwards;
}

.landing-page h1, .landing-page h2, .landing-page h3 {
    color: #ffffff;
}

.landing-page p {
    color: #94a3b8; /* Soft light gray for readability */
}

.landing-page .accent-text {
    color: #60a5fa !important; /* Bright blue accent for headers on dark background */
}

/* public-header */
.public-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    z-index: 501;
    background: rgba(15, 23, 42, 0.95); /* Semi-transparent dark header */
    backdrop-filter: blur(8px);
    border-bottom: 3px solid #ef4444; /* Red accent border */
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.public-header h2 {
    color: #ffffff !important;
}

.public-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.public-nav a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.public-nav a:hover {
    color: #ef4444; /* Hover to red accent */
}

/* Custom Buttons for Landing Page */
.btn-red {
    background: #ef4444;
    color: white;
    border-radius: 8px; /* Slightly rounded for friendly feel */
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn-red:hover {
    background: #dc2626;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
    color: white;
}

/* Override Glass Panels for Sleek Dark Cards */
.landing-page .glass-panel {
    background: #1e293b; /* Solid dark elevated card */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* White card variation for specific sections */
.landing-page .white-card {
    background: #ffffff;
    color: #111827;
}
.landing-page .white-card h2, .landing-page .white-card h3 {
    color: #111827 !important;
}
.landing-page .white-card p {
    color: #4b5563 !important;
}

/* Rims Gallery Styles */
.rims-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.rim-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rim-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.4);
}

.rim-img-wrapper {
    width: 100%;
    height: 300px;
    background: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.rim-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.rim-card:hover .rim-img {
    transform: scale(1.05);
}

.rim-details {
    padding: 1.5rem;
    background: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f8fafc;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #ef4444;
}

.landing-container {
    width: 100%;
    max-width: 1200px;
    margin: 6rem auto 2rem;
    padding: 0 2rem;
}

.hero-section {
    position: relative;
    text-align: center;
    padding: 8rem 2rem;
    margin-bottom: 3rem;
    border-radius: 12px;
    overflow: hidden;
}

.hero-bg {
    background-image: url('hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.7));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Animations */
@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.pulse-anim {
    animation: pulseRed 2s infinite;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #ef4444;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delay animations for sections to stagger them slightly on load */
#about { animation-delay: 0.2s; }
#services { animation-delay: 0.4s; }
#locations { animation-delay: 0.6s; }

.info-section {
    margin-bottom: 4rem;
}

.info-section h2 {
    margin-bottom: 2rem;
    font-size: 2.25rem;
    text-align: center;
    color: #111827;
}

.service-card {
    padding: 2.5rem 2rem;
    text-align: center;
}

.service-card h3 {
    margin: 1rem 0;
    font-size: 1.25rem;
}

:root {
    --bg-color: #0f172a;
    --sidebar-bg: rgba(30, 41, 59, 0.7);
    --card-bg: rgba(30, 41, 59, 0.6);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-red: #ef4444;

    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body.dark-theme {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    background-attachment: fixed;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-right: var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: var(--sidebar-bg);
    padding: 2rem 1.5rem;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-image: url('logo.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
}

.brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.nav-item.active {
    color: #fff;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.nav-item svg {
    transition: transform var(--transition-fast);
}

.nav-item:hover svg {
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
    position: relative;
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
}

.section-header.with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Glass Cards */
.glass-card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glass-shadow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

/* Stats Grid for Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 12px;
}

.stat-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.stat-card .value {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.stat-card .value.highlight-green {
    color: #10b981;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.blue-gradient { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.green-gradient { background: linear-gradient(135deg, #10b981, #059669); }
.purple-gradient { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.metric-info h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Data Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.low-stock {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    outline: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-block {
    width: 100%;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.icon-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Action group */
.action-group {
    display: flex;
    gap: 8px;
}

/* Forms */
.custom-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

input, select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    color: white;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    width: 100%;
    max-width: 500px;
    background: var(--bg-color);
    border: var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.highlight-green {
    color: #34d399;
}

.form-summary {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Login Screen */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15), transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
}

.login-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 3rem 2rem;
    border-radius: 20px;
    background: var(--sidebar-bg);
}

.login-brand {
    justify-content: center;
    margin-bottom: 0.5rem;
}

.login-error {
    color: var(--accent-red);
    font-size: 0.875rem;
    text-align: center;
    min-height: 20px;
}

/* Grid Layouts */
.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.split-panel {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .public-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .public-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
    }

    .public-nav a {
        padding: 0.5rem 1rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        font-size: 0.9rem;
    }
    
    .public-nav button {
        width: 100%;
        margin-top: 0.5rem;
    }

    .brand h2 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 3rem 1rem;
        min-height: 350px;
    }

    .hero h1 {
        font-size: 2rem !important;
    }

    .hero p {
        font-size: 1rem !important;
    }

    /* Fix iOS/mobile background-attachment fixed glitch */
    body.dark-theme, .hero-bg {
        background-attachment: scroll !important;
    }

    .grid-2col {
        grid-template-columns: 1fr;
    }
    
    .split-panel {
        flex-direction: column !important;
    }
    
    .split-panel > div {
        width: 100%;
        min-height: 250px;
    }
    
    .rims-grid {
        grid-template-columns: 1fr;
    }
    
    /* Metrics Grid */
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        padding: 1rem;
        flex-direction: column;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar .brand {
        display: none;
    }

    .sidebar .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
    }

    .sidebar .nav-menu .nav-item {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .sidebar > div {
        margin-top: 0.5rem !important;
    }

    .sidebar #logout-btn {
        margin-bottom: 0 !important;
    }

    .main-content {
        padding: 1rem;
    }
}
