/*
 * Skyconnect Theme for daloRADIUS
 * Custom branding and styling for Skyconnect ISP
 *
 * Color Palette:
 *   Primary:   #761023 (deep red)
 *   Secondary: #a61a2e (medium red)
 *   Accent:    #d90429 (vivid red)
 *   Gold:      #ffd700 (gold accent)
 *   Dark:      #232323 (near-black)
 *   Blue:      #2596be (info blue)
 */

/* ============================================
   CSS VARIABLE OVERRIDES (Bootstrap 5)
   ============================================ */
:root {
    --bs-primary: #761023;
    --bs-primary-rgb: 118, 16, 35;
    --bs-secondary: #a61a2e;
    --bs-secondary-rgb: 166, 26, 46;
    --bs-success: #198754;
    --bs-success-rgb: 25, 135, 84;
    --bs-info: #2596be;
    --bs-info-rgb: 37, 150, 190;
    --bs-danger: #d90429;
    --bs-danger-rgb: 217, 4, 41;
    --bs-dark: #232323;
    --bs-dark-rgb: 35, 35, 35;
    --bs-link-color: #761023;
    --bs-link-hover-color: #a61a2e;

    --sky-primary: #761023;
    --sky-primary-light: #a61a2e;
    --sky-accent: #d90429;
    --sky-gold: #ffd700;
    --sky-dark: #232323;
    --sky-blue: #2596be;
    --sky-gradient: linear-gradient(135deg, #761023 0%, #a61a2e 50%, #d90429 100%);
    --sky-gradient-horizontal: linear-gradient(90deg, #761023, #d90429);
    --sky-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
body {
    font-family: var(--sky-font) !important;
}

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

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

/* ============================================
   NAVBAR / HEADER
   ============================================ */
header.border-bottom {
    background: var(--sky-gradient) !important;
    border-bottom: 3px solid var(--sky-gold) !important;
    box-shadow: 0 2px 12px rgba(118, 16, 35, 0.3);
}

header .row {
    padding: 0.35rem 0.5rem !important;
}

header .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 4px;
    padding: 0.4rem 0.75rem !important;
}

header .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.15);
}

header .nav-link.link-active,
header a.link-active {
    color: var(--sky-gold) !important;
    font-weight: 600;
    background-color: rgba(255, 215, 0, 0.1);
}

header .nav-link.link-dark {
    color: rgba(255, 255, 255, 0.85) !important;
}

header .nav-link.link-dark:hover {
    color: #fff !important;
}

/* Header logo link */
header a.text-dark {
    color: #fff !important;
}

/* Header search */
header .input-group .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

header .input-group .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

header .input-group .form-control {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

header .input-group .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

header .input-group .form-control:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--sky-gold);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
    color: #fff;
}

/* User dropdown in header */
header .link-dark.dropdown-toggle {
    color: #fff !important;
}

header .dropdown-menu {
    border: 1px solid rgba(118, 16, 35, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   SUB-NAVIGATION
   ============================================ */
nav.border-bottom.text-bg-light {
    background: #f8f0f2 !important;
    border-bottom: 2px solid rgba(118, 16, 35, 0.12) !important;
}

nav.border-bottom .nav-link.link-dark {
    color: var(--sky-dark) !important;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav.border-bottom .nav-link.link-dark:hover {
    color: var(--sky-primary) !important;
}

/* ============================================
   SIDEBAR
   ============================================ */
#sidebar,
div.bg-light.text-dark.border-end {
    background: linear-gradient(180deg, #faf7f8 0%, #f5f0f1 100%) !important;
    border-right: 2px solid rgba(118, 16, 35, 0.1) !important;
}

#sidebar a,
div.bg-light.text-dark.border-end a {
    color: var(--sky-dark);
    transition: color 0.15s ease, padding-left 0.15s ease;
}

#sidebar a:hover,
div.bg-light.text-dark.border-end a:hover {
    color: var(--sky-primary);
    padding-left: 4px;
}

#sidebar .list-unstyled > li > a.text-decoration-none,
#sidebar a.link-dark {
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

#sidebar a.link-dark:hover {
    background: rgba(118, 16, 35, 0.06);
}

/* Sidebar section headings */
#sidebar strong,
#sidebar .fw-bold {
    color: var(--sky-primary) !important;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background-color: var(--sky-primary) !important;
    border-color: var(--sky-primary) !important;
    color: #fff !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--sky-primary-light) !important;
    border-color: var(--sky-primary-light) !important;
    box-shadow: 0 4px 12px rgba(118, 16, 35, 0.3);
}

.btn-primary:active {
    background-color: var(--sky-accent) !important;
    border-color: var(--sky-accent) !important;
}

.btn-outline-primary {
    color: var(--sky-primary) !important;
    border-color: var(--sky-primary) !important;
}

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

.btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.btn-danger {
    background-color: var(--sky-accent) !important;
    border-color: var(--sky-accent) !important;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border-radius: 8px !important;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(118, 16, 35, 0.15);
    transform: translateY(-1px);
}

/* Dashboard cards color overrides */
.text-bg-primary {
    background-color: var(--sky-primary) !important;
}

.text-bg-danger {
    background-color: var(--sky-accent) !important;
}

.text-bg-success {
    background-color: #198754 !important;
}

.card .btn-light {
    color: var(--sky-dark);
    font-weight: 500;
}

.card .btn-light:hover {
    background-color: var(--sky-gold);
    border-color: var(--sky-gold);
    color: var(--sky-dark);
}

/* ============================================
   TABLES
   ============================================ */
.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(118, 16, 35, 0.03);
}

.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(118, 16, 35, 0.07);
}

.table th {
    background: linear-gradient(180deg, #f8f0f2, #f3eaec);
    color: var(--sky-dark);
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 2px solid rgba(118, 16, 35, 0.15);
}

/* ============================================
   FORMS
   ============================================ */
.form-control:focus,
.form-select:focus {
    border-color: var(--sky-primary-light);
    box-shadow: 0 0 0 0.2rem rgba(118, 16, 35, 0.2);
}

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

/* ============================================
   BADGES & ALERTS
   ============================================ */
.badge.bg-primary,
.badge.text-bg-primary {
    background-color: var(--sky-primary) !important;
}

.badge.bg-danger,
.badge.text-bg-danger {
    background-color: var(--sky-accent) !important;
}

.alert-primary {
    color: #4a0a16;
    background-color: #f5dde1;
    border-color: #f0ccd2;
}

.alert-info {
    color: #155a73;
    background-color: #d4eef7;
    border-color: #bee5f2;
}

/* ============================================
   FOOTER
   ============================================ */
.text-bg-light.border-top.border-bottom {
    background: var(--sky-gradient) !important;
    color: #fff !important;
    border-top: 2px solid var(--sky-gold) !important;
    border-bottom: none !important;
    padding: 1.5rem !important;
}

.text-bg-light.border-top.border-bottom * {
    color: rgba(255, 255, 255, 0.9) !important;
}

.text-bg-light.border-top.border-bottom a {
    color: var(--sky-gold) !important;
}

.text-bg-light.border-top.border-bottom a:hover {
    color: #fff !important;
}

/* Footer logo area */
.text-bg-light.border-top .text-bg-white {
    background: transparent !important;
}

/* ============================================
   PAGINATION
   ============================================ */
.page-link {
    color: var(--sky-primary);
}

.page-link:hover {
    color: var(--sky-primary-light);
    background-color: #f5dde1;
}

.page-item.active .page-link {
    background-color: var(--sky-primary);
    border-color: var(--sky-primary);
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(118, 16, 35, 0.06);
    color: var(--sky-primary);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--sky-primary);
    color: #fff;
}

/* ============================================
   MODAL
   ============================================ */
.modal-header {
    background: var(--sky-gradient);
    color: #fff;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* ============================================
   TOAST
   ============================================ */
.toast.text-bg-danger {
    background-color: var(--sky-accent) !important;
}

/* ============================================
   SCROLLBAR (webkit)
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(118, 16, 35, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(118, 16, 35, 0.5);
}

/* ============================================
   MISCELLANEOUS
   ============================================ */

/* Page titles */
h1, h2, h3, h4, h5, h6 {
    color: var(--sky-dark);
}

/* Active nav link style (used in daloRADIUS) */
.link-active {
    color: var(--sky-gold) !important;
    font-weight: 600 !important;
}

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

/* Tooltips */
.tooltip .tooltip-inner {
    background-color: var(--sky-dark);
}

/* Selection color */
::selection {
    background: rgba(118, 16, 35, 0.2);
    color: var(--sky-dark);
}
