/* CUP-TECH Limited Brand Stylesheet */
/* Brand palette: Slate Grey (#4A5568) + Burnt Orange (#B34A00) */

/* Import Manrope from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #b34a00;      /* Burnt Orange */
    --primary-color-dark: #973c00;
    --secondary-color: #4a5568;    /* Slate Grey */
    --accent-color: #4a5568;
    --dark-bg: #4a5568;            /* Slate Grey */
    --light-bg: #f8f9fa;
    --font-main: 'Manrope', sans-serif;

    /* Bootstrap 5 overrides so bg-primary/text-primary/btn-primary etc. follow the brand */
    --bs-primary: #b34a00;
    --bs-primary-rgb: 179, 74, 0;
    --bs-secondary: #4a5568;
    --bs-secondary-rgb: 74, 85, 104;
    --bs-dark: #4a5568;
    --bs-dark-rgb: 74, 85, 104;

    /* Link & nav-pills: prevent Bootstrap default blue everywhere */
    --bs-link-color: #b34a00;
    --bs-link-hover-color: #973c00;
    --bs-nav-link-color: #4a5568;
    --bs-nav-link-hover-color: #b34a00;
    --bs-nav-pills-link-active-color: #fff;
    --bs-nav-pills-link-active-bg: #b34a00;

    /* Pagination / focus ring: burnt orange instead of blue */
    --bs-pagination-color: #b34a00;
    --bs-pagination-hover-color: #b34a00;
    --bs-pagination-active-bg: #b34a00;
    --bs-pagination-active-border-color: #b34a00;
    --bs-focus-ring-color: rgba(179, 74, 0, 0.25);
}

body {
    font-family: var(--font-main);
    background-color: var(--light-bg);
    color: #333;
}

/* Typography Utilities based on Manrope */
.fw-extra-bold { font-weight: 800; }
.fw-bold { font-weight: 700; }
.fw-semi-bold { font-weight: 600; }
.fw-medium { font-weight: 500; }
.fw-regular { font-weight: 400; }
.fw-black { font-weight: 900; }

/* Brand Accent for Text / Links */
a {
    color: var(--primary-color);
}

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

/* Footer links: burnt orange on hover (CUP-TECH Limited, Administration, Staff Login) */
footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Card Styling for Dashboard */
.card-cbt {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.card-cbt:hover {
    transform: translateY(-5px);
}

/* ============================================================
   CUP-TECH BRAND ENFORCEMENT
   Explicit !important overrides so Bootstrap default (blue)
   can never win regardless of stylesheet order or specificity.
   ============================================================ */

/* Backgrounds */
.bg-primary {
    background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important;
}

.bg-dark {
    background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity, 1)) !important;
}

.bg-secondary {
    background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity, 1)) !important;
}

/* Text */
.text-primary {
    color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity, 1)) !important;
}

.text-dark {
    color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity, 1)) !important;
}

.text-secondary {
    color: rgba(var(--bs-secondary-rgb), var(--bs-text-opacity, 1)) !important;
}

/* Buttons */
.btn-primary {
    --bs-btn-bg: var(--bs-primary) !important;
    --bs-btn-border-color: var(--bs-primary) !important;
    --bs-btn-color: #fff !important;
    --bs-btn-hover-bg: var(--primary-color-dark) !important;
    --bs-btn-hover-border-color: var(--primary-color-dark) !important;
    --bs-btn-focus-shadow-rgb: 179, 74, 0 !important;
    --bs-btn-active-bg: var(--primary-color-dark) !important;
    --bs-btn-active-border-color: var(--primary-color-dark) !important;
    --bs-btn-disabled-bg: var(--bs-primary) !important;
    --bs-btn-disabled-border-color: var(--bs-primary) !important;
    background-color: var(--primary-color) !important;
    border: none;
    font-weight: 600;
    padding: 10px 20px;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.show {
    background-color: var(--primary-color-dark) !important;
    border-color: var(--primary-color-dark) !important;
    box-shadow: 0 4px 12px rgba(179, 74, 0, 0.25) !important;
}

.btn-outline-primary {
    --bs-btn-color: var(--bs-primary) !important;
    --bs-btn-border-color: var(--bs-primary) !important;
    --bs-btn-hover-bg: var(--bs-primary) !important;
    --bs-btn-hover-border-color: var(--bs-primary) !important;
    --bs-btn-active-bg: var(--primary-color-dark) !important;
    --bs-btn-active-border-color: var(--primary-color-dark) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

.btn-dark {
    --bs-btn-bg: var(--bs-dark) !important;
    --bs-btn-border-color: var(--bs-dark) !important;
    --bs-btn-hover-bg: var(--bs-dark) !important;
    --bs-btn-hover-border-color: var(--bs-dark) !important;
    --bs-btn-active-bg: var(--bs-dark) !important;
}

/* Navbar variants built from primary/dark */
.navbar-dark.bg-primary,
.navbar.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Badges / Alerts / Active states that default to blue */
.badge.bg-primary,
.alert-primary {
    background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important;
}

.badge.bg-primary.text-primary {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
    color: var(--primary-color) !important;
}

/* Form controls focus glow (blue -> burnt orange) */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(179, 74, 0, 0.12) !important;
}

.form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Pagination & list-group active states */
.page-item.active .page-link,
.list-group-item.active,
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Links inside brand navbars stay crisp */
.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
    color: #fff !important;
}

/* Sidebar / nav-pills menus: slate-grey text, burnt-orange hover/active (never blue) */
.nav-pills .nav-link:not(.active):not(.text-danger) {
    color: var(--secondary-color) !important;
}

.nav-pills .nav-link:not(.active):hover {
    color: var(--primary-color) !important;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

/* ============================================================
   MOBILE / NATIVE-APP REFINEMENTS
   ============================================================ */

/* Prevent stray horizontal page scroll on all devices */
body {
    overflow-x: hidden;
}

/* Mobile tables: force a minimum width so table-responsive always scrolls
   on small screens instead of squeezing columns into unreadability. */
@media (max-width: 767.98px) {
    .table-responsive > .table {
        min-width: 540px;
    }
}

/* Landing page: keep huge display headings legible on phones */
@media (max-width: 575.98px) {
    .hero-section .display-3 {
        font-size: 2.2rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }
}

/* Dashboard content area: comfortable padding on small screens */
@media (max-width: 767.98px) {
    .flex-grow-1.bg-light {
        padding: 1rem 0.75rem !important;
    }
}

/* Bigger, finger-friendly form controls on touch screens */
@media (pointer: coarse) {
    .form-control,
    .form-select {
        min-height: 48px;
        font-size: 1rem;
    }

    .btn,
    .nav-link,
    a {
        touch-action: manipulation;
    }
}

/* Print: never clip responsive tables (PIN receipts, results) */
@media print {
    body {
        overflow-x: visible;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .table-responsive > .table {
        min-width: 0 !important;
    }
}