:root {
    --tm-primary: #551C85;
    --tm-primary-dark: #3D105F;
    --tm-primary-light: #63459B;
    --tm-primary-soft: #EEE8F4;

    --tm-accent: #E0A342;
    --tm-accent-dark: #B98024;

    --tm-gray: #858585;
    --tm-gray-light: #E5E5E5;
    --tm-background: #F7F5FA;
    --tm-surface: #FFFFFF;

    --tm-text: #28242D;
    --tm-text-muted: #6F6875;
    --tm-border: #DDD6E4;

    --tm-success: #198754;
    --tm-warning: #D89A24;
    --tm-danger: #DC3545;

    --tm-shadow: 0 4px 14px rgba(61, 16, 95, 0.10);
    --tm-shadow-hover: 0 8px 22px rgba(61, 16, 95, 0.16);
    --tm-radius: 0.75rem;
}

body {
    background: var(--tm-background);
    color: var(--tm-text);
}

a {
    color: var(--tm-primary);
}

a:hover {
    color: var(--tm-primary-dark);
}

.tm-navbar {
    background: linear-gradient(135deg, var(--tm-primary-dark), var(--tm-primary));
    box-shadow: var(--tm-shadow);
}

.tm-navbar .navbar-brand,
.tm-navbar .nav-link,
.tm-navbar .navbar-text {
    color: #ffffff;
}

.tm-navbar .navbar-brand:hover,
.tm-navbar .nav-link:hover,
.tm-navbar .nav-link:focus {
    color: #ffffff;
}

.tm-navbar .nav-link {
    border-radius: 999px;
    padding-inline: 0.85rem;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.tm-navbar .nav-link:hover,
.tm-navbar .nav-link:focus,
.tm-navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
}

.tm-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.45);
}

.tm-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(224, 163, 66, 0.35);
}

.tm-navbar-logo {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: #ffffff;
}

.tm-brand-text {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.dropdown-menu {
    border-color: var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
}

.dropdown-item:active,
.dropdown-item:focus {
    background: var(--tm-primary-soft);
    color: var(--tm-primary-dark);
}

.btn {
    border-radius: 0.65rem;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus {
    border-color: var(--tm-primary-light);
    box-shadow: 0 0 0 0.2rem rgba(85, 28, 133, 0.18);
}

.btn-primary {
    background: var(--tm-primary);
    border-color: var(--tm-primary);
}

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

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

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--tm-primary);
    border-color: var(--tm-primary);
    color: #ffffff;
}

.btn-accent {
    background: var(--tm-accent);
    border-color: var(--tm-accent);
    color: #231c12;
}

.btn-accent:hover,
.btn-accent:focus {
    background: var(--tm-accent-dark);
    border-color: var(--tm-accent-dark);
    color: #ffffff;
}

.card,
.tm-card {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
}

.tm-card-hover {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.card-img-top,
.tm-card-img {
    object-fit: cover;
}
.tm-product-image {
    height: 220px;
    object-fit: cover;
}
.tm-hero {
    background:
        radial-gradient(circle at top left, rgba(224, 163, 66, 0.22), transparent 26rem),
        linear-gradient(135deg, var(--tm-primary-dark), var(--tm-primary));
    color: #ffffff;
    border-radius: calc(var(--tm-radius) * 1.4);
    padding: 2rem;
    box-shadow: var(--tm-shadow);
}

.tm-hero p {
    color: rgba(255, 255, 255, 0.88);
}

.badge {
    border-radius: 999px;
    font-weight: 600;
}

.badge-tm-primary {
    background: var(--tm-primary-soft);
    color: var(--tm-primary-dark);
}

.badge-tm-accent {
    background: rgba(224, 163, 66, 0.22);
    color: #6d4710;
}

.badge-tm-hidden {
    background: #4b4453;
    color: #ffffff;
}

.table {
    --bs-table-bg: var(--tm-surface);
}

.table-responsive {
    border-radius: var(--tm-radius);
}

.form-control,
.form-select {
    border-color: var(--tm-border);
    border-radius: 0.65rem;
}

.form-text,
.text-muted {
    color: var(--tm-text-muted) !important;
}

.alert {
    border-radius: var(--tm-radius);
}

.tm-footer {
    background: var(--tm-surface);
    border-top: 1px solid var(--tm-border);
    color: var(--tm-text-muted);
}

.toast {
    border-radius: var(--tm-radius);
    border-color: var(--tm-border);
    box-shadow: var(--tm-shadow);
}

@media (max-width: 575.98px) {
    .tm-navbar-logo {
        width: 36px;
        height: 36px;
    }

    .tm-brand-text {
        font-size: 1rem;
    }

    .tm-hero {
        padding: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* =========================
   Forms
========================= */

.tm-form-page {
    max-width: 760px;
    margin: 0 auto;
}

.tm-form-card {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    padding: 1.5rem;
}

.tm-form-card-lg {
    max-width: 960px;
}

.tm-form-header {
    margin-bottom: 1.5rem;
}

.tm-form-header h1,
.tm-form-header h2 {
    color: var(--tm-primary-dark);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.tm-form-header p {
    color: var(--tm-text-muted);
    margin-bottom: 0;
}

.tm-form .tm-field {
    margin-bottom: 1rem;
}

.tm-form label {
    font-weight: 600;
    color: var(--tm-text);
    margin-bottom: 0.35rem;
}

.tm-form input:not([type="checkbox"]):not([type="radio"]),
.tm-form select,
.tm-form textarea {
    width: 100%;
    display: block;
    border: 1px solid var(--tm-border);
    border-radius: 0.65rem;
    padding: 0.65rem 0.8rem;
    color: var(--tm-text);
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tm-form textarea {
    min-height: 120px;
    resize: vertical;
}

.tm-form input:focus,
.tm-form select:focus,
.tm-form textarea:focus {
    outline: none;
    border-color: var(--tm-primary-light);
    box-shadow: 0 0 0 0.2rem rgba(85, 28, 133, 0.18);
}

.tm-form input[type="checkbox"],
.tm-form input[type="radio"] {
    accent-color: var(--tm-primary);
}

.tm-form .form-check,
.tm-form .tm-checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--tm-border);
    border-radius: 0.65rem;
    background: var(--tm-primary-soft);
}

.tm-form .tm-checkbox-field label {
    margin-bottom: 0;
    font-weight: 500;
}

.tm-help-text {
    display: block;
    color: var(--tm-text-muted);
    font-size: 0.875rem;
    margin-top: 0.3rem;
}

.tm-field-errors {
    margin-top: 0.35rem;
    color: var(--tm-danger);
    font-size: 0.9rem;
}

.tm-field-errors ul,
.tm-form-errors ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.tm-form-errors {
    border: 1px solid rgba(220, 53, 69, 0.25);
    background: rgba(220, 53, 69, 0.08);
    color: var(--tm-danger);
    border-radius: 0.65rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.tm-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.5rem;
}

.tm-form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tm-primary-dark);
    border-bottom: 1px solid var(--tm-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .tm-form-card {
        padding: 1rem;
    }

    .tm-form-actions .btn {
        width: 100%;
    }
}

/* =========================
   Auth / Login
========================= */

.tm-auth-card {
    max-width: 520px;
    margin: 0 auto;
}

.tm-auth-card .tm-form-header {
    text-align: center;
}

.tm-auth-card .tm-form-actions {
    justify-content: center;
}

.tm-auth-card .btn {
    min-width: 140px;
}

.tm-auth-page {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
}

/* =========================
   Global layout spacing
========================= */

.tm-page-content {
    padding-top: 2rem;
    padding-bottom: 2rem;
}


/* =========================
   Auth pages
========================= */

.tm-auth-shell {
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.tm-auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    padding: 2rem;
}

.tm-auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.tm-auth-header h1 {
    color: var(--tm-primary-dark);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.tm-auth-header p {
    color: var(--tm-text-muted);
    margin-bottom: 0;
}

.tm-auth-form {
    display: block;
}

.tm-auth-form .tm-field {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
}

.tm-auth-form label {
    display: block;
    width: 100%;
}

.tm-auth-form input:not([type="checkbox"]):not([type="radio"]),
.tm-auth-form select,
.tm-auth-form textarea {
    width: 100%;
}

.tm-auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--tm-border);
    text-align: center;
    color: var(--tm-text-muted);
}

.tm-auth-footer a {
    color: var(--tm-primary);
    font-weight: 600;
}

@media (max-width: 576px) {
    .tm-auth-shell {
        min-height: auto;
        padding: 1rem 0;
    }

    .tm-auth-card {
        padding: 1.25rem;
    }
}

