/* ---------------------------------------------------------
   HOSTRA BILLING SKIN (Global Overrides) - FINAL MERGED
--------------------------------------------------------- */

/* 1. TYPOGRAPHY (Match CMS) */
body {
    font-family: 'Inter', sans-serif !important;
    color: #4b5563;
    background-color: #f3f4f6;
}

h1, h2, h3, h4, h5, h6 {
    color: #111827;
    font-weight: 700;
}

/* 2. BUTTONS (Kill the Green!) */
/* These are the base styles. Specific overrides are at the bottom. */
.btn-success, .btn-success:hover, .btn-success:active, .btn-success:focus {
    background-color: #3795fc !important; /* Hostra Blue */
    border-color: #3795fc !important;
    color: #fff !important;
    box-shadow: 0 4px 6px rgba(55, 149, 252, 0.25);
    transition: all 0.2s ease;
}

.btn-success:hover {
    background-color: #2a75cb !important;
    transform: translateY(-2px);
}

.btn-info {
    background-color: #00d084 !important; /* Hostra Secondary */
    border-color: #00d084 !important;
    color: #fff !important;
}

.btn-primary {
    background-color: #3795fc !important;
    border-color: #3795fc !important;
}

/* 3. CARD / PANELS (Modernize Blesta Panels) */
.card, .panel, .card-blesta, .content_section {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025) !important;
    background: #fff !important;
    margin-bottom: 20px !important;
    overflow: hidden !important;
}

.panel-heading, .card-header, .card-blesta h4, .content_section h1, .content_section h2, #client_domains h3 {
    background: #ffffff !important;
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 1.25rem 1.5rem !important;
    font-weight: 700 !important;
    font-size: 1.45rem !important; /* Forces uniform H3 size */
    color: #111827 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin: 0 !important;
}

.panel-title {
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    color: #111827 !important;
}

.panel-body, .card-body, .content_section .inner {
    padding: 25px !important;
}

/* 4. FORMS & DROPDOWNS (The Dropdown Fix) */
.form-control, select.form-control, select.form-select, #account_type {
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important; /* Force visible border */
    padding: 12px 15px !important;
    height: auto !important;
    min-height: 45px !important;
    box-shadow: none !important;
    background-color: #ffffff !important;
    color: #111827 !important; /* Force dark text */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    appearance: auto !important;
    -webkit-appearance: menulist !important; /* Forces browser arrow */
}

.form-control:focus {
    border-color: #3795fc !important;
    box-shadow: 0 0 0 3px rgba(55, 149, 252, 0.1) !important;
}

/* Force Labels to be visible and dark */
#account_details label, .card-body label, .hostra-theme label, .form-group label {
    color: #374151 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
}

/* Hide broken 'fancy' dropdowns */
.nice-select, .select2-container {
    display: none !important;
}

/* 5. FOOTER FIXES (Align Left) */
.footer {
    background-color: #0a0b0f !important;
    color: #9ca3af !important;
    padding: 60px 0 !important;
    font-size: 0.9rem !important;
    margin-top: 0 !important;
    border-top: 1px solid #e5e7eb;
    text-align: left !important; /* Fix alignment */
}

.footer .container, .footer div {
    text-align: left !important;
}

.footer h5 {
    color: #fff !important;
    margin-bottom: 20px;
}

.footer a {
    color: #9ca3af !important;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #3795fc !important;
}

@media (max-width: 767px) {
    .footer, .footer .container, .footer div {
        text-align: center !important; /* Center on Mobile */
    }
}

/* 6. LOGIN PAGE SPECIFIC */
.login-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

/* 7. HEADER & NAVBAR FIXES */
.main-header {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 15px 0;
}

.navbar-brand img {
    height: 40px;
}

.navbar-nav .nav-link {
    color: #4b5563 !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover {
    color: #3795fc !important;
}

.navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

#header {
    display: none !important;
}

/* ============================================================
   8. BRUTE FORCE PLUGIN OVERRIDES (Tables & Layouts)
   ============================================================ */

/* Force Table Width & Styling */
.card-blesta table, .content_section table, .table-responsive table {
    margin-bottom: 0 !important;
    width: 100% !important;
}

.card-blesta table thead th, .table thead th {
    background: #f8fafc !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em !important;
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.card-blesta table tbody td, .table tbody td {
    padding: 1.25rem 1.5rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
    color: #4b5563 !important;
}

/* Status Badge Colors */
.badge-success { background-color: #10b981 !important; color: #fff !important; }
.badge-warning { background-color: #f59e0b !important; color: #fff !important; }
.badge-danger { background-color: #ef4444 !important; color: #fff !important; }
.badge-info { background-color: #3b82f6 !important; color: #fff !important; }

/* Make sure the "Float End" buttons actually stay on the right */
.card-header.clearfix {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* ============================================================
   9. GLOBAL BUTTON LOGIC (The Specific Fixes)
   ============================================================ */

/* A. Force Blue for ALL Plugin/Action Buttons */
.btn-light, 
.btn-sm-light, 
.btn-default,
.btn-secondary,
.card-header .btn,
.panel-heading .btn,
#client_tickets .btn,
#client_domains .btn,
.client_pay .btn, 
.client_pay_confirm .btn-primary,
#client_pay .btn-primary {
    background-color: #3795fc !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(55, 149, 252, 0.15) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.btn-light:hover, 
.btn-sm-light:hover {
    background-color: #2a75cb !important;
    transform: translateY(-1px) !important;
}

/* B. THE DASHBOARD EXCEPTION (Must be last to win contrast battle) */
/* Targets buttons ONLY inside the dashboard 'stat cards' */
#client_main .card-blesta .btn,
#client_main .btn-light,
#client_main .btn-sm-light,
.client-dashboard .btn-light {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    backdrop-filter: blur(5px) !important;
    box-shadow: none !important;
}

#client_main .btn:hover {
    background-color: #ffffff !important;
    color: #3795fc !important;
}

/* C. CLEANUP: Hide Duplicate Buttons if Script Added One */
#client_tickets .card-header a.btn:not(.btn-shop):not(.btn-ticket):not(.btn-hostra-fixed),
#client_orders .card-header a.btn:not(.btn-shop):not(.btn-ticket):not(.btn-hostra-fixed) {
    display: none !important;
}
/* ---------------------------------------------------------
   10. ORDER FORM MODERNIZATION (Phase 2)
   Targets: Wizard Boxes, Ajax, and Standard Templates
--------------------------------------------------------- */

/* A. Order Navigation & Progress Steps */
.order-wizard .nav-tabs, 
.order-wizard .nav-pills,
.order-step-container {
    border: none !important;
    margin-bottom: 2rem !important;
    gap: 10px !important;
}

.order-wizard .nav-link,
.order-step {
    background: #ffffff !important;
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    color: #6b7280 !important;
    padding: 12px 20px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.order-wizard .nav-link.active,
.order-step.active {
    background: #3795fc !important;
    color: #ffffff !important;
    border-color: #3795fc !important;
    box-shadow: 0 4px 12px rgba(55, 149, 252, 0.3) !important;
}

/* B. Package Selection Cards (Wizard Boxes) */
/* This makes the "Choose Plan" boxes match your homepage features */
.package-boxes .package-box,
.order-wizard .package-list .card,
#order-main .package-group {
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    padding: 20px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    background: #fff !important;
    margin-bottom: 15px !important;
}

.package-boxes .package-box:hover,
.order-wizard .package-list .card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    border-color: #3795fc !important;
}

.package-boxes .package-box.selected {
    border: 2px solid #3795fc !important;
    background-color: rgba(55, 149, 252, 0.02) !important;
}

/* C. Order Summary Sidebar */
#order-summary,
.order-summary-container,
.order-cart-summary {
    background: #ffffff !important;
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    padding: 25px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.order-summary-container h3,
.order-cart-summary .card-title {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
    border-bottom: 1px solid #f3f4f6 !important;
    padding-bottom: 10px !important;
}

/* D. Domain Search Modernization */
.order-wizard .domain-search,
.order-ajax .domain-finder {
    background: #ffffff !important;
    padding: 30px !important;
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
}

.order-wizard .domain-search input[type="text"] {
    height: 55px !important;
    border-radius: 8px 0 0 8px !important;
    font-size: 1.1rem !important;
}

.order-wizard .domain-search .btn-primary {
    height: 55px !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 0 30px !important;
}

/* E. Quick Fixes for Legibility */
/* Forcing labels and price text to match Hostra styles */
.order-wizard label, 
.order-ajax label {
    font-weight: 500 !important;
    color: #374151 !important;
    margin-bottom: 8px !important;
}

.package-boxes .price, 
.package-list .price-tag {
    color: #111827 !important;
    font-weight: 700 !important;
    font-size: 1.4rem !important;
}
/* ---------------------------------------------------------
   11. STAFF PANEL (ADMIN) MODERNIZATION
--------------------------------------------------------- */

/* Header & Top Nav */
#header {
    background-color: #0a0b0f !important; /* Hostra Dark Navy */
    border-bottom: 3px solid #3795fc !important;
}

#header .top_nav ul li a {
    color: #cbd5e1 !important;
    font-family: 'Inter', sans-serif !important;
}

#header .top_nav ul li.active a,
#header .top_nav ul li a:hover {
    color: #ffffff !important;
    background-color: rgba(55, 149, 252, 0.2) !important;
}

/* Sidebar Navigation */
.left_nav {
    background-color: #f9fafb !important;
    border-right: 1px solid #e5e7eb !important;
}

.left_nav ul li a {
    border-radius: 8px !important;
    margin: 4px 10px !important;
    color: #4b5563 !important;
    transition: all 0.2s ease !important;
}

.left_nav ul li a.active,
.left_nav ul li a:hover {
    background-color: #3795fc !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(55, 149, 252, 0.2) !important;
}

/* Dashboard Cards & Widgets */
.common_box {
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
}

.common_box_header {
    background: #ffffff !important;
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 15px 20px !important;
}

.common_box_inner {
    padding: 20px !important;
}

/* Global Staff Buttons */
.btn_inline, 
button, 
input[type="submit"] {
    background: #3795fc !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    color: #fff !important;
}