/*
 * ContentRyte Brand Overrides
 * Loaded after style.css to override theme defaults with brand colors.
 *
 * Brand Palette:
 *   Primary:   #6366f1 (Indigo)
 *   Secondary: #8b5cf6 (Violet)
 *   Text:      #1e1b4b (Navy)
 *   Accent:    #a78bfa (Light Violet)
 *   Success:   #059669 (Green)
 *   Warning:   #d97706 (Amber)
 *   Danger:    #ef4444 (Red)
 */

/* ═══════════════════════════════════════════
   CSS VARIABLES
   ═══════════════════════════════════════════ */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --text-color: #1e1b4b;
    --dark-color: #1e1b4b;
    --cr-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --cr-bg-light: #f9fafb;
    --cr-border: #f3f4f6;
    --cr-border-hover: #e5e7eb;
    --cr-text-muted: #6b7280;
    --cr-text-secondary: #9ca3af;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:disabled {
    background: var(--cr-gradient) !important;
    border-color: #6366f1 !important;
    box-shadow: none !important;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline-primary {
    color: #6366f1 !important;
    border-color: #6366f1 !important;
    background: transparent !important;
}

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

.btn-secondary,
.btn-secondary:hover,
.btn-secondary:focus {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
}

.btn-accent,
.btn-accent:hover {
    background: var(--cr-gradient) !important;
    border: none !important;
    color: #fff !important;
}

/* ═══════════════════════════════════════════
   TEXT & LINKS
   ═══════════════════════════════════════════ */
.tt-main-wrapper a,
.tt-main-content a {
    color: #6366f1;
}

.tt-main-wrapper a:hover,
.tt-main-content a:hover {
    color: #4f46e5;
}

.text-primary {
    color: #6366f1 !important;
}

.text-secondary {
    color: #8b5cf6 !important;
}

/* ═══════════════════════════════════════════
   BACKGROUNDS
   ═══════════════════════════════════════════ */
.bg-primary {
    background-color: #6366f1 !important;
}

.bg-secondary {
    background-color: #8b5cf6 !important;
}

.bg-content {
    background-color: #f9fafb !important;
}

/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */
/* Sidebar styles are in style.css (appended at bottom for source-order specificity) */

/* ═══════════════════════════════════════════
   TOP HEADER
   ═══════════════════════════════════════════ */
.tt-top-fixed {
    background: #fff !important;
    border-bottom: 1px solid #f3f4f6;
    box-shadow: none !important;
}

/* ═══════════════════════════════════════════
   CARDS & CONTAINERS
   ═══════════════════════════════════════════ */
.card {
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    box-shadow: none;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
}

/* ═══════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════ */
.form-control:focus,
.form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

/* ═══════════════════════════════════════════
   TABS & NAV PILLS
   ═══════════════════════════════════════════ */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #6366f1 !important;
    color: #fff !important;
}

.nav-link {
    color: #6b7280;
}

.nav-link:hover {
    color: #6366f1;
}

/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */
.page-link {
    color: #6366f1;
}

.page-item.active .page-link {
    background-color: #6366f1;
    border-color: #6366f1;
}

/* ═══════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════ */
.badge.bg-primary {
    background: var(--cr-gradient) !important;
}

/* ═══════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════ */
.table thead th {
    color: #9ca3af;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    border-bottom: 2px solid #f3f4f6;
}

.table td {
    border-bottom: 1px solid #f9fafb;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════ */
.modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* ═══════════════════════════════════════════
   OFFCANVAS (sidebar add/edit forms)
   ═══════════════════════════════════════════ */
.offcanvas {
    border: none;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
}

/* ═══════════════════════════════════════════
   PROGRESS BARS
   ═══════════════════════════════════════════ */
.progress-bar {
    background-color: #6366f1;
}

/* ═══════════════════════════════════════════
   SELECTION & FOCUS
   ═══════════════════════════════════════════ */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: #1e1b4b;
}

/* ═══════════════════════════════════════════
   TOOLTIP & POPOVER
   ═══════════════════════════════════════════ */
.tooltip-inner {
    background: #1e1b4b;
    border-radius: 6px;
    font-size: 12px;
}

/* ═══════════════════════════════════════════
   DROPDOWNS
   ═══════════════════════════════════════════ */
.dropdown-item:active,
.dropdown-item.active {
    background-color: #6366f1;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f5f3ff;
    color: #6366f1;
}

/* ═══════════════════════════════════════════
   SWITCHES & TOGGLES
   ═══════════════════════════════════════════ */
.form-switch .form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

/* ═══════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════ */
.alert-primary {
    background-color: #ede9fe;
    border-color: #c4b5fd;
    color: #4338ca;
}

/* ═══════════════════════════════════════════
   SCROLLBARS (webkit)
   ═══════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f9fafb;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ═══════════════════════════════════════════
   HEADING TYPOGRAPHY
   ═══════════════════════════════════════════ */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
    color: #1e1b4b;
    font-weight: 600;
}

/* ═══════════════════════════════════════════
   PAGE TITLE BAR
   ═══════════════════════════════════════════ */
.tt-page-header {
    background: transparent !important;
}

.tt-page-title h1,
.tt-page-title .h4 {
    color: #1e1b4b !important;
    font-weight: 700;
}

/* ═══════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════ */
.breadcrumb-item a {
    color: #6366f1;
}

.breadcrumb-item.active {
    color: #9ca3af;
}

/* ═══════════════════════════════════════════
   USER PROFILE DROPDOWN
   ═══════════════════════════════════════════ */
.tt-user-dropdown .dropdown-menu {
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ═══════════════════════════════════════════
   SWEETALERT2 OVERRIDES
   ═══════════════════════════════════════════ */
.swal2-confirm.swal2-styled {
    background: var(--cr-gradient) !important;
    border: none !important;
}

/* ═══════════════════════════════════════════
   MAIN CONTENT SCROLLBAR — restore visibility
   ═══════════════════════════════════════════
   style.css hides the .tt-main-content scrollbar (width: 0px). On long admin
   pages (e.g. /admin/settings-credentials) that scrolls internally, users had
   no cue that more content existed below the fold — the page looked truncated.
   This override brings back a thin, brand-toned scrollbar. */
.tt-main-content::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}
.tt-main-content::-webkit-scrollbar-track {
    background: transparent;
}
.tt-main-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}
.tt-main-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
/* Firefox */
.tt-main-content {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
