﻿:root {
    --accent: #dfbe6f;
    --accent-dark: #c8a75a;
    --surface: #ffffff;
    --background: #f5f5f7;
    --border: #e0e0e0;
    --text: #1a1a1a;
    --muted: #6b6b6b;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--background);
    color: var(--text);
    margin: 0;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

main {
    padding-top: 80px !important;
    flex: 1;
}

/* Loading Spinner */
#loading-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

/* Spinner Animation */
.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}


/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e5ea;
}

.navbar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 8px;
}

.navbar-nav .nav-link {
    color: var(--text);
    font-weight: 500;
    transition: color 0.2s;
}

    .navbar-nav .nav-link:hover {
        color: var(--accent);
    }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(223,190,111,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Typography */
.accent {
    color: var(--accent);
}

/* Cards */
.card, .stick-card {
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .card:hover, .stick-card:hover {
        box-shadow: var(--shadow);
    }

/* Stick History Horizontal Scroll */
.stick-history-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
}

    .stick-history-container::-webkit-scrollbar {
        height: 6px;
    }

    .stick-history-container::-webkit-scrollbar-thumb {
        background: var(--accent);
        border-radius: 3px;
    }

@media (min-width: 768px) {
    .stick-history-container {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .stick-card {
        flex: 1 1 calc(50% - 1rem);
        min-width: unset;
    }
}

@media (min-width: 1200px) {
    .stick-card {
        flex: 1 1 calc(33.33% - 1rem);
    }
}

.btn {
    border-radius: 2rem;
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    border: none;
    font-weight: 600;
}

    .btn-primary:hover {
        background: var(--accent-dark);
        border-color: var(--accent-dark);
    }

    .btn-primary:focus {
        background: var(--accent-dark);
        border-color: var(--accent-dark);
    }

.btn-outline-primary {
    border-color: var(--accent);
    color: var(--accent);
}

    .btn-outline-primary:hover {
        background: rgba(223,190,111,0.15);
        color: var(--accent-dark);
        border-color: var(--accent-dark);
    }

    .btn-outline-primary:active {
        border-color: var(--accent-dark);
    }

    /* Progress */
    .progress-bar.accent {
        background-color: var(--accent);
    }

/* Form Controls */
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(223,190,111,0.25);
}

/* Skeleton Loaders */
.skeleton-card {
    background: linear-gradient(90deg, #e0e0e0 25%, #f5f5f7 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    height: 120px;
    border-radius: var(--radius);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Toasts */
.toast-container {
    z-index: 1080;
}

.text-align-webkit-center {
    text-align: -webkit-center;
}

/* Left-align date text everywhere */
input[type="date"].form-control {
    text-align: left;
}

    /* iOS Safari / mobile Chrome need the inner parts forced */
    input[type="date"].form-control::-webkit-datetime-edit,
    input[type="date"].form-control::-webkit-date-and-time-value,
    input[type="date"].form-control::-webkit-datetime-edit-fields-wrapper {
        text-align: left;
    }

/* If your app supports RTL, prefer start instead of left */
html[dir="rtl"] input[type="date"].form-control,
html[dir="rtl"] input[type="date"].form-control::-webkit-datetime-edit {
    text-align: start;
}
