/**
 * CBGG DMS shared theme — the Web Orders design applied site-wide.
 * Loaded AFTER each page's inline <style> so it overrides the common
 * components (header, nav, cards, tables, buttons, inputs) consistently.
 * Page-specific layout is left alone.
 */

body {
    background: #f1f5f9;
}

/* ---- header ---- */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #1a2634 100%) !important;
    border-bottom: 3px solid #dc2626;
    box-shadow: none;
    padding: 1rem 2rem !important;
}
/* Match the compact Web Orders header height (title was 24px). */
.header .logo,
.header .header-content .logo {
    font-size: 1.05rem !important;
    font-weight: 700;
    gap: 8px !important;
}
.header .accent {
    color: #f87171;
    font-weight: 600;
}
/* Centred header bar aligned with the page content — brand sits above the
   content's left edge (the tidy "indented" look). */
.header .header-content,
.header .header-inner {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
}
/* Remove the logo icons + separator from the header — keep the brand title,
   matching the cleaner Web Orders header. */
.header .logo img,
.header .logo a,
.header .logo span[style*="opacity"] {
    display: none !important;
}
/* Clean header: drop the "Welcome, email" text, keep only the brand + Logout. */
.header .user-info .user-email,
.header .user-email {
    display: none !important;
}
.logout,
a.logout {
    background: #dc2626 !important;
    color: #fff !important;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    transition: background .2s;
}
.logout:hover,
a.logout:hover {
    background: #991b1b !important;
}

/* ---- quick nav ---- */
.quick-nav {
    gap: 8px;
}
.quick-nav a {
    color: #2c3e50;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: all .15s;
}
.quick-nav a:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fff;
}
.quick-nav a.active {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

/* ---- page title with red accent ---- */
.page-title {
    color: #2c3e50;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.page-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 52px;
    height: 4px;
    border-radius: 2px;
    background: #dc2626;
}

/* ---- cards ---- */
.card,
.stat-card,
.stats-card,
.dashboard-card,
.action-card,
.section-card {
    border-radius: 12px !important;
    border: 1px solid #e5eaf0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06) !important;
    background: #fff;
}

/* ---- tables ---- */
table thead th,
table th {
    background: #2c3e50 !important;
    color: #e2e8f0 !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    border-bottom: none;
}
tbody tr:nth-child(even) {
    background: #f8fafc;
}
tbody tr:hover {
    background: #fef6f6;
}

/* ---- buttons ---- */
.btn {
    border-radius: 8px !important;
    font-weight: 600;
    transition: all .15s;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
    cursor: pointer;
}
.btn:hover {
    filter: brightness(.92);
}
.btn.red,
.btn-danger,
.btn.delete {
    background: linear-gradient(180deg, #dc2626, #b91c1c) !important;
    color: #fff;
}
.btn.red:hover,
.btn-danger:hover,
.btn.delete:hover {
    background: #991b1b !important;
    filter: none;
}
.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* ---- form inputs ---- */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fbfdff;
    /* No global padding — pages set their own (e.g. icon-inset inputs need a
       larger left pad); forcing it here slid text under the field icons. */
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: 2px solid #fecaca;
    border-color: #dc2626;
}

/* ---- centred content (indented layout) ---- */
.container,
.wrap {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
/* Wide tables scroll INSIDE their own box, never the whole page. */
.table-container {
    overflow-x: auto !important;
    max-width: 100%;
}
/* Let data-table cells wrap so the table fits the page width instead of
   forcing a horizontal scrollbar (overrides per-page white-space:nowrap). */
.data-table th,
.data-table td {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* ---- uniform typography: one size per text type, site-wide ---- */
.container h1,
.wrap h1,
.page-title {
    font-size: 1.9rem !important;
    line-height: 1.2;
}
.container h2,
.wrap h2 {
    font-size: 1.2rem !important;
}
.container h3,
.wrap h3 {
    font-size: 1rem !important;
}
.container p,
.container label,
.container td,
.container li,
.wrap p,
.wrap label {
    font-size: 14px !important;
}
.container th {
    font-size: 11px !important;
}
.btn,
.container input,
.container select,
.container textarea {
    font-size: 14px !important;
}

/* ---- status pills (where pages use them) ---- */
.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    line-height: 1.5;
}
