/* ============================================================
   Hostiko - Main Stylesheet
   Colors: Primary #0044a8 | Dark #002b6b | Accent #00aaff
   ============================================================ */

:root {
    --primary:  #0044a8;
    --primary-dark: #002b6b;
    --primary-light: #e8f0fe;
    --accent:   #00aaff;
    --success:  #198754;
    --text:     #1a1a2e;
    --muted:    #6c757d;
    --border:   #dee2e6;
    --bg-light: #f8f9ff;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: #fff;
}

/* ── Top Bar ─────────────────────────────────────────────── */
.topbar {
    background: var(--primary-dark);
    color: #fff;
    font-size: 0.82rem;
}
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: #fff; }

/* ── Navbar ──────────────────────────────────────────────── */
.navbar { border-bottom: 1px solid var(--border); }
.navbar-brand img { transition: opacity .2s; }
.navbar-brand:hover img { opacity: .85; }
.nav-link { font-weight: 500; color: var(--text) !important; font-size: .92rem; }
.nav-link:hover, .nav-link.active { color: var(--primary) !important; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

/* ── Hero Section ────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--accent) 100%);
    color: #fff;
    padding: 90px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -80px;
    width: 450px; height: 450px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -60px;
    width: 350px; height: 350px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}
.hero h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.2; }
.hero p { font-size: 1.15rem; opacity: .9; }

/* ── Domain Search ───────────────────────────────────────── */
.domain-search-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
}
.domain-search-card .input-group { border-radius: 10px; overflow: hidden; }
.domain-search-card input {
    border: 2px solid var(--border);
    border-right: none;
    font-size: 1rem;
    padding: .75rem 1rem;
}
.domain-search-card input:focus {
    border-color: var(--primary);
    box-shadow: none;
}
.domain-search-card .btn { padding: .75rem 1.5rem; font-weight: 600; }
.tld-badge {
    display: inline-block;
    padding: .25rem .6rem;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 600;
    margin: .2rem;
}

/* ── Section Headings ────────────────────────────────────── */
.section-heading { font-size: 2rem; font-weight: 800; }
.section-sub { color: var(--muted); font-size: 1.05rem; }

/* ── Feature Cards ───────────────────────────────────────── */
.feature-card {
    background: var(--bg-light);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    border: 1px solid transparent;
    transition: border-color .25s, box-shadow .25s, transform .25s;
    height: 100%;
}
.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(0,68,168,.1);
    transform: translateY(-4px);
}
.feature-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ── Pricing Cards ───────────────────────────────────────── */
.pricing-card {
    border-radius: 16px;
    border: 2px solid var(--border);
    overflow: hidden;
    transition: border-color .25s, box-shadow .25s, transform .25s;
    height: 100%;
}
.pricing-card:hover, .pricing-card.popular {
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(0,68,168,.15);
    transform: translateY(-6px);
}
.pricing-card .card-header {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
}
.pricing-card.popular .card-header {
    background: var(--primary);
    color: #fff;
    border-bottom: none;
}
.pricing-card .price { font-size: 2.2rem; font-weight: 800; }
.pricing-card .price sup { font-size: 1rem; font-weight: 600; vertical-align: top; margin-top: .4rem; }
.pricing-card .price .period { font-size: .9rem; font-weight: 400; color: var(--muted); }
.pricing-card.popular .price .period { color: rgba(255,255,255,.8); }
.pricing-card ul li { padding: .35rem 0; font-size: .92rem; }

/* ── Stats Bar ───────────────────────────────────────────── */
.stats-bar {
    background: var(--primary);
    color: #fff;
    padding: 3rem 0;
}
.stat-item h3 { font-size: 2.4rem; font-weight: 800; }

/* ── Payment Badges ──────────────────────────────────────── */
.payment-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .5rem 1rem;
    font-size: .85rem;
    font-weight: 500;
}
.payment-badge i { color: var(--primary); font-size: 1.1rem; }

/* ── Client Dashboard ────────────────────────────────────── */
.sidebar {
    /* Hidden on mobile — shown only on desktop via media query below */
    display: none;
    width: 260px;
    min-height: 100vh;
    background: var(--primary-dark);
    padding: 1.5rem 0;
    flex-shrink: 0;
    flex-direction: column;
}
.sidebar .nav-link {
    color: rgba(255,255,255,.8) !important;
    padding: .65rem 1.5rem;
    border-radius: 0;
    font-size: .9rem;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,.12);
    border-left: 3px solid var(--accent);
}
.sidebar .nav-link i { width: 22px; }

.content-area {
    flex: 1;
    background: var(--bg-light);
    min-height: 100vh;
    padding: 2rem;
    min-width: 0; /* prevent overflow */
}

.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.stat-card .icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}

/* ── Tables ──────────────────────────────────────────────── */
.table-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
}
.table-card .table { margin-bottom: 0; }
.table-card .table th { background: var(--bg-light); font-size: .85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* ── Status Badges ───────────────────────────────────────── */
.badge-active   { background: #d1fae5; color: #065f46; }
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-suspended{ background: #fee2e2; color: #991b1b; }
.badge-paid     { background: #d1fae5; color: #065f46; }
.badge-unpaid   { background: #fee2e2; color: #991b1b; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
    background: #0f172a;
    color: #cbd5e1;
}
.footer h6 { color: #fff; }
.footer p,
.footer small,
.footer .text-muted { color: #94a3b8 !important; }
.footer a.text-muted { color: #94a3b8 !important; }
.footer a.text-muted:hover { color: #fff !important; }
.footer-link {
    color: #94a3b8;
    text-decoration: none;
    display: block;
    margin-bottom: .35rem;
    transition: color .2s;
}
.footer-link:hover { color: var(--accent); }
.footer hr { border-color: rgba(255,255,255,.1); }

/* ── Utilities ───────────────────────────────────────────── */
.text-primary { color: var(--primary) !important; }
.bg-primary-soft { background: var(--primary-light); color: var(--primary); }
.rounded-xl { border-radius: 16px; }
.shadow-soft { box-shadow: 0 4px 24px rgba(0,0,0,.07); }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease both; }

/* ── Pricing Page (pricing.php) ──────────────────────────── */
.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 16px 48px rgba(0,68,168,.2);
    transform: translateY(-8px);
    position: relative;
}
.badge-popular {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .35rem 1rem;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.pricing-card {
    padding: 2rem;
    position: relative;
}
.plan-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .5rem;
}
.price-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}
.price-period {
    font-size: .88rem;
    color: var(--muted);
}
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.feature-list li {
    padding: .45rem 0;
    font-size: .9rem;
    border-bottom: 1px solid var(--border);
}
.feature-list li:last-child { border-bottom: none; }
.btn-white {
    background: #fff;
    color: var(--primary);
    border: 2px solid #fff;
    font-weight: 600;
}
.btn-white:hover {
    background: rgba(255,255,255,.9);
    color: var(--primary-dark);
    border-color: rgba(255,255,255,.9);
}

/* ── Pricing Cards (shared across index + pricing page) ─────── */
.pricing-card-new {
    background: #fff;
    border-radius: 18px;
    border: 1.5px solid var(--border);
    overflow: hidden;
    transition: box-shadow .25s, transform .25s, border-color .25s;
    padding: 0;
    position: relative;
}
.pricing-card-new:hover {
    box-shadow: 0 12px 40px rgba(0,68,168,.12);
    border-color: var(--primary);
    transform: translateY(-4px);
}
.pricing-card-new .plan-header {
    background: var(--bg-light);
    padding: 1.75rem 1.75rem 1.5rem;
    border-bottom: 1.5px solid var(--border);
}
.pricing-card-new.featured-plan {
    border-color: var(--primary);
    box-shadow: 0 16px 48px rgba(0,68,168,.18);
    transform: translateY(-8px);
}
.pricing-card-new.featured-plan:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0,68,168,.22);
}
.pricing-card-new.featured-plan .plan-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #0077cc 100%);
    border-bottom: none;
}
.popular-badge {
    position: absolute;
    top: -1px; left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .3rem 1.1rem;
    border-radius: 0 0 10px 10px;
    white-space: nowrap;
    letter-spacing: .06em;
    text-transform: uppercase;
    z-index: 2;
}
.plan-name-new {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: .5rem;
}
.pricing-card-new.featured-plan .plan-name-new { color: rgba(255,255,255,.75) !important; }
.price-row {
    display: flex;
    align-items: baseline;
    gap: .2rem;
    line-height: 1;
    margin-bottom: .4rem;
}
.price-currency {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}
.price-val {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -.02em;
}
.price-per {
    font-size: .9rem;
    font-weight: 500;
    color: var(--muted);
}
.price-sub {
    font-size: .75rem;
    color: var(--muted);
    margin-top: .2rem;
}
.pricing-card-new.featured-plan .price-currency,
.pricing-card-new.featured-plan .price-val { color: #fff !important; }
.pricing-card-new.featured-plan .price-per,
.pricing-card-new.featured-plan .price-sub { color: rgba(255,255,255,.7) !important; }
.plan-features {
    list-style: none;
    padding: 1.25rem 1.75rem .75rem;
    margin: 0;
}
.plan-features li {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem 0;
    font-size: .9rem;
    border-bottom: 1px solid var(--bg-light);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li i {
    color: var(--primary);
    font-size: .95rem;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}
.pricing-card-new .btn {
    border-radius: 0 0 16px 16px;
    margin: 0 1.75rem 1.75rem;
    width: calc(100% - 3.5rem) !important;
}
.pricing-card-new.featured-plan .btn-white {
    background: #fff;
    color: var(--primary);
    border: none;
    font-weight: 700;
}
.pricing-card-new.featured-plan .btn-white:hover {
    background: rgba(255,255,255,.92);
}
.btn-white {
    background: #fff;
    color: var(--primary);
    border: 2px solid #fff;
    font-weight: 600;
}
.btn-white:hover {
    background: rgba(255,255,255,.9);
    color: var(--primary-dark);
}

/* ── Badge variants ──────────────────────────────────────── */
.badge-cancelled { background: #f3f4f6; color: #374151; }
.badge-terminated { background: #fee2e2; color: #991b1b; }
.badge-expired { background: #fee2e2; color: #991b1b; }

/* ── Invoice print ───────────────────────────────────────── */
@media print {
    .sidebar, .topbar, .navbar, footer, .btn, .alert, .no-print { display: none !important; }
    .content-area { padding: 0 !important; background: #fff !important; }
    body { background: #fff !important; }
}

/* ── Client Mobile Top Navbar ────────────────────────────── */
.client-topnav {
    display: none; /* shown only on mobile via .client-wrapper below */
    width: 100%;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.client-topnav .navbar-toggler:focus { box-shadow: none; }

/* Nav links inside the collapse */
.client-nav-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .75rem;
    border-radius: 8px;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.client-nav-link:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}
.client-nav-link.active {
    background: rgba(255,255,255,.15);
    color: #fff;
    border-left: 3px solid var(--accent);
    padding-left: calc(.75rem - 3px);
}
.client-nav-link.text-danger-soft {
    color: rgba(255, 150, 150, .85);
}
.client-nav-link.text-danger-soft:hover {
    background: rgba(255,80,80,.15);
    color: #ffaaaa;
}

/* ── Responsive ──────────────────────────────────────────── */
/* ── Client layout: desktop (sidebar left, content right) ── */
@media (min-width: 992px) {
    .client-wrapper { flex-direction: row !important; }
    .sidebar        { display: flex !important; }
    .client-topnav  { display: none !important; }
}

/* ── Client layout: mobile (topnav above, content below) ─── */
@media (max-width: 991.98px) {
    .client-wrapper {
        flex-direction: column !important;
        min-height: 100vh;
    }
    .client-topnav {
        display: block !important;
        position: sticky;
        top: 0;
        z-index: 1030;
        width: 100%;
    }
    .sidebar { display: none !important; }
    .content-area {
        padding: 1.25rem !important;
        width: 100% !important;
        min-height: auto;
    }
}

@media (max-width: 1199px) {
    /* Tighten content area on mid-screens */
    .content-area { padding: 1.5rem; }
}

@media (max-width: 991px) {
    /* Hero */
    .hero { padding: 60px 0 50px; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }

    /* Tables scroll horizontally */
    .table-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table-card .table {
        min-width: 540px;
    }

    /* Remove hover transforms on pricing cards for mobile */
    .pricing-card-new.featured-plan {
        transform: none;
        margin-top: .5rem;
    }
    .pricing-card-new.featured-plan:hover {
        transform: translateY(-4px);
    }
    .pricing-card.featured {
        transform: none;
    }

    /* Section headings */
    .section-heading { font-size: 1.75rem; }
    .section-sub { font-size: 1rem; }
}

@media (max-width: 767px) {
    /* Hero */
    .hero { padding: 50px 0 40px; }
    .hero h1 { font-size: 1.7rem; }
    .hero p { font-size: .95rem; }

    /* Section headings */
    .section-heading { font-size: 1.5rem; }
    .section-sub { font-size: .95rem; }

    /* Domain search card */
    .domain-search-card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    .domain-search-card .btn { padding: .65rem 1rem; font-size: .9rem; }

    /* Stats bar */
    .stats-bar { padding: 2rem 0; }
    .stat-item h3 { font-size: 1.8rem; }
    .stat-item p { font-size: .85rem; }

    /* Feature cards */
    .feature-card { padding: 1.5rem 1.25rem; }
    .feature-icon { width: 46px; height: 46px; font-size: 1.25rem; }

    /* Pricing cards */
    .pricing-card-new { margin-bottom: .5rem; }
    .pricing-card-new.featured-plan { transform: none; margin-top: 0; }
    .price-val { font-size: 2.2rem; }
    .plan-features { padding: 1rem 1.25rem .5rem; }
    .pricing-card-new .btn {
        margin: 0 1.25rem 1.25rem;
        width: calc(100% - 2.5rem) !important;
    }
    .pricing-card-new .plan-header { padding: 1.25rem; }

    /* Content area */
    .content-area { padding: 1rem; }

    /* Stat cards */
    .stat-card { padding: 1rem; }
    .stat-card .icon { width: 42px; height: 42px; font-size: 1.1rem; }

    /* Navbar: reduce font sizes */
    .nav-link { font-size: .88rem; }

    /* Payment badges wrap */
    .payment-badge { font-size: .8rem; padding: .4rem .75rem; }

    /* Buttons */
    .btn { font-size: .88rem; }

    /* Offcanvas table no min-width override on very small tables */
    .table-card .table { min-width: 480px; }

    /* Footer columns stack */
    .footer .row > [class*="col-"] { margin-bottom: 1.5rem; }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .hero h1 { font-size: 1.45rem; }
    .hero p { font-size: .88rem; }
    .section-heading { font-size: 1.3rem; }
    .stat-item h3 { font-size: 1.5rem; }
    .price-val { font-size: 1.9rem; }

    /* Domain search stacks on very small screens */
    .domain-search-card .input-group { flex-wrap: wrap; }
    .domain-search-card .input-group input {
        border-right: 2px solid var(--border);
        border-bottom: none;
        border-radius: 8px 8px 0 0 !important;
        width: 100%;
    }
    .domain-search-card .input-group .btn {
        border-radius: 0 0 8px 8px !important;
        width: 100%;
    }

    /* Full-width buttons in client area */
    .content-area .btn-primary { width: 100%; }
}
