/* ================================================================
   style.css — Bariklabs Shared Styles
   Common elements used across all pages
   ================================================================ */

/* ─── GOOGLE FONTS (import in each HTML) ─────────────────────────
   @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');
   ──────────────────────────────────────────────────────────────── */

/* ─── TOKENS ──────────────────────────────────────────────────── */

:root {
    /* Brand */
    --accent: #2a9d8f;
    --accent-dim: color-mix(in srgb, var(--accent) 12%, white);
    --accent-mid: color-mix(in srgb, var(--accent) 30%, white);
    --accent-hover: color-mix(in srgb, var(--accent) 85%, black);
    /* Surfaces */
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f0f2f5;
    --border: #e4e7ec;
    --border-strong: #d0d5dd;
    /* Text */
    --text-primary: #101828;
    --text-secondary: #475467;
    --text-muted: #98a2b3;
    /* Semantic */
    --success: #12b76a;
    --success-bg: color-mix(in srgb, var(--success) 10%, white);
    --warning: #f79009;
    --warning-bg: color-mix(in srgb, var(--warning) 10%, white);
    --danger: #f04438;
    --danger-bg: color-mix(in srgb, var(--danger) 10%, white);
    --info: #0ea5e9;
    --info-bg: color-mix(in srgb, var(--info) 10%, white);
    /* Shape */
    --radius: 10px;
    --radius-sm: calc(var(--radius) * 0.6);
    --radius-lg: calc(var(--radius) * 1.6);
    --radius-full: 999px;
    /* Elevation */
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, .10), 0 1px 2px rgba(16, 24, 40, .06);
    --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, .10), 0 2px 4px -2px rgba(16, 24, 40, .06);
    /* Layout */
    --sidebar-w: 252px;
    --header-h: 70px;
    /* Type scale - turun 2px total */
    --fs-xs: 0.72rem;
    /* 0.7825 - 0.0625 = 0.72 (11.52px) */
    --fs-sm: 0.8125rem;
    /* 0.875 - 0.0625 = 0.8125 (13px) */
    --fs-base: 0.9375rem;
    /* 1.0 - 0.0625 = 0.9375 (15px) */
    --fs-md: 1.0rem;
    /* 1.0625 - 0.0625 = 1.0 (16px) */
    --fs-lg: 1.125rem;
    /* 1.1875 - 0.0625 = 1.125 (18px) */
    --fs-xl: 1.375rem;
    /* 1.4375 - 0.0625 = 1.375 (22px) */
    --fs-2xl: 1.8125rem;
    /* 1.875 - 0.0625 = 1.8125 (29px) */
    --fs-3xl: 2.3125rem;
    /* 2.375 - 0.0625 = 2.3125 (37px) */
}
/* ─── RESET ───────────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    font-size: 18px;
}
body {
    font-family: 'DM Sans', sans-serif;
    font-size: var(--fs-base);
    color: var(--text-primary);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}
img {
    display: block;
    max-width: 100%;
}
textarea, select, input {
    font-family: inherit;
}
/* ─── SCROLLBAR ───────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-full);
}
/* ─── SIDEBAR ─────────────────────────────────────────────────── */

.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform .25s ease;
}
.sidebar-logo {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.logo-mark {
    width: 64px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.logo-mark svg {
    width: 18px;
    height: 18px;
}
.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: var(--fs-lg);
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--text-primary);
    line-height: 1;
}
.logo-text span {
    color: var(--accent);
}
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}
.nav-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    padding: 12px 8px 5px;
    margin-top: 6px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: background .15s, color .15s;
}
.nav-item:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}
.nav-item.active {
    background: var(--accent-dim);
    color: var(--accent);
}
.nav-item svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    opacity: .85;
}
.nav-item.active svg {
    opacity: 1;
}
.nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}
.nav-item.nav-soon {
    opacity: .55;
    cursor: default;
    pointer-events: none;
}
.nav-soon-badge {
    margin-left: auto;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-mid);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--accent-hover);
    flex-shrink: 0;
    letter-spacing: .03em;
    flex-shrink: 0;
}
.footer-info {
    flex: 1;
    min-width: 0;
}
.footer-name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.footer-role {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}
.footer-logout {
    color: var(--text-muted);
    transition: color .15s;
    padding: 4px;
}
.footer-logout:hover {
    color: var(--danger);
}
/* ─── LAYOUT ──────────────────────────────────────────────────── */

.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.page-content {
    padding: 26px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}
/* ─── TOPBAR ──────────────────────────────────────────────────── */

.topbar {
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 30px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-title {
    flex: 1;
}
.topbar-title h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.1;
}
.topbar-title p {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 1px;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* ─── BUTTONS ─────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 500;
    transition: background .15s, color .15s, box-shadow .15s;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    font-family: inherit;
}
.btn svg {
    width: 15px;
    height: 15px;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-xs);
}
.btn-primary:hover {
    background: var(--accent-hover);
}
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}
.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 20%, white);
}
.btn-danger:hover {
    background: color-mix(in srgb, var(--danger) 16%, white);
}
.btn-sm {
    padding: 5px 12px;
    font-size: var(--fs-xs);
}
.btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background .15s, color .15s;
    position: relative;
}
.icon-btn:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}
.icon-btn svg {
    width: 16px;
    height: 16px;
}
.icon-btn .notif-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    border: 1.5px solid var(--surface);
}
/* ─── CARD ────────────────────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}
.card-title {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title svg {
    width: 15px;
    height: 15px;
    color: var(--accent);
}
.card-subtitle {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 400;
}
.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-body {
    padding: 20px 22px;
}
/* ─── BADGE ───────────────────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.badge-green {
    background: var(--success-bg);
    color: var(--success);
}
.badge-green::before {
    background: var(--success);
}
.badge-orange {
    background: var(--warning-bg);
    color: var(--warning);
}
.badge-orange::before {
    background: var(--warning);
}
.badge-blue {
    background: var(--info-bg);
    color: var(--info);
}
.badge-blue::before {
    background: var(--info);
}
.badge-red {
    background: var(--danger-bg);
    color: var(--danger);
}
.badge-red::before {
    background: var(--danger);
}
.badge-gray {
    background: var(--surface-2);
    color: var(--text-muted);
}
.badge-gray::before {
    background: var(--text-muted);
}
.badge-teal {
    background: var(--accent-dim);
    color: var(--accent-hover);
}
.badge-teal::before {
    background: var(--accent);
}
/* ─── TYPE CHIP ───────────────────────────────────────────────── */

.type-chip {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}
.type-chip.dev {
    background: var(--info-bg);
    color: var(--info);
}
.type-chip.maint {
    background: var(--surface-2);
    color: var(--text-muted);
}
/* ─── TABLE ───────────────────────────────────────────────────── */

.table-wrap {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
thead th {
    text-align: left;
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    padding: 10px 22px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .12s;
}
tbody tr:last-child {
    border-bottom: none;
}
tbody tr:hover {
    background: color-mix(in srgb, var(--bg) 60%, transparent);
}
tbody td {
    padding: 13px 22px;
    font-size: var(--fs-sm);
    vertical-align: middle;
}
.td-main {
    font-weight: 500;
    color: var(--text-primary);
}
.td-sub {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 2px;
}
.table-footer {
    padding: 13px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    font-size: var(--fs-xs);
    color: var(--text-muted);
}
/* ─── FILTER BAR ──────────────────────────────────────────────── */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.search-wrap {
    position: relative;
    flex: 1;
    min-width: 160px;
}
.search-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 8px 10px 8px 34px;
    font-family: inherit;
    font-size: var(--fs-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.search-input::placeholder {
    color: var(--text-muted);
}
.filter-select {
    padding: 8px 11px;
    font-family: inherit;
    font-size: var(--fs-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    outline: none;
    cursor: pointer;
    transition: border-color .15s;
}
.filter-select:focus {
    border-color: var(--accent);
}
/* ─── PROGRESS BAR ────────────────────────────────────────────── */

.progress-bar-bg {
    background: var(--surface-2);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--accent);
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
.progress-bar-fill.warning {
    background: var(--warning);
}
.progress-bar-fill.danger {
    background: var(--danger);
}
.progress-bar-fill.success {
    background: var(--success);
}
/* ─── FORM ELEMENTS ───────────────────────────────────────────── */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.form-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.form-input, .form-select, .form-textarea {
    padding: 8px 12px;
    font-family: inherit;
    font-size: var(--fs-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input::placeholder, .form-textarea::placeholder {
    color: var(--text-muted);
}
.form-textarea {
    resize: vertical;
    min-height: 72px;
}
/* ─── DIVIDER ─────────────────────────────────────────────────── */

.divider {
    height: 1px;
    background: var(--border);
}
/* ─── EMPTY STATE ─────────────────────────────────────────────── */

.empty-state {
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.empty-state svg {
    width: 36px;
    height: 36px;
    color: var(--border-strong);
}
.empty-state p {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}
/* ─── MOBILE SIDEBAR ──────────────────────────────────────────── */

.menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 90;
}
/* ─── ANIMATIONS ──────────────────────────────────────────────── */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}
.animate-fade-up {
    animation: fadeUp .35s ease both;
}
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}
/* ─── RESPONSIVE ──────────────────────────────────────────────── */

@media (max-width: 700px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.open {
        display: block;
    }
    .main {
        margin-left: 0;
    }
    .menu-toggle {
        display: flex;
    }
    .page-content {
        padding: 16px;
    }
    .topbar {
        padding: 0 16px;
    }
}
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}
/* stat cards */

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow .2s, transform .2s;
    text-decoration: none;
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.stat-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon svg {
    width: 17px;
    height: 17px;
}
.stat-icon.teal {
    background: var(--accent-dim);
    color: var(--accent);
}
.stat-icon.green {
    background: var(--success-bg);
    color: var(--success);
}
.stat-icon.orange {
    background: var(--warning-bg);
    color: var(--warning);
}
.stat-icon.blue {
    background: var(--info-bg);
    color: var(--info);
}
.stat-trend {
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.stat-trend.up {
    background: var(--success-bg);
    color: var(--success);
}
.stat-trend.warn {
    background: var(--warning-bg);
    color: var(--warning);
}
.stat-trend.neu {
    background: var(--surface-2);
    color: var(--text-muted);
}
.stat-val {
    font-family: 'Cormorant Garamond', serif;
    font-size: var(--fs-3xl);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -.03em;
    line-height: 1;
}
.stat-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 2px;
}
/* billing banner */

.billing-banner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.billing-banner-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    flex-wrap: wrap;
}
.billing-cycle-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.billing-cycle-period {
    font-family: 'Cormorant Garamond', serif;
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -.02em;
    line-height: 1.1;
}
.billing-due {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 2px;
}
.billing-divider {
    width: 1px;
    height: 44px;
    background: var(--border);
    flex-shrink: 0;
}
.billing-amount-wrap {
    display: flex;
    flex-direction: column;
}
.billing-amount-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-bottom: 2px;
}
.billing-amount-val {
    font-family: 'Cormorant Garamond', serif;
    font-size: var(--fs-2xl);
    font-weight: 600;
    color: var(--accent-hover);
    letter-spacing: -.02em;
    line-height: 1;
}
.billing-rate {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 1px;
}
.billing-progress-wrap {
    flex: 1;
    min-width: 160px;
}
.billing-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-bottom: 6px;
}
.billing-bar-bg {
    height: 6px;
    background: var(--surface-2);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.billing-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--accent);
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
}
.billing-banner-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    background: var(--warning-bg);
    border-top: 1px solid color-mix(in srgb, var(--warning) 20%, white);
    font-size: var(--fs-xs);
    color: var(--warning);
    font-weight: 500;
}
.billing-banner-alert svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.billing-banner-alert a {
    color: var(--warning);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
/* domain breakdown */

.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.domain-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: box-shadow .2s;
}
.domain-card:hover {
    box-shadow: var(--shadow-md);
}
.domain-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
}
.domain-favicon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    border: 1px solid var(--accent-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--accent-hover);
    flex-shrink: 0;
}
.domain-name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.domain-card-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.domain-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-xs);
}
.domain-stat-key {
    color: var(--text-muted);
}
.domain-stat-val {
    font-weight: 600;
    color: var(--text-primary);
}
.domain-mini-bar-bg {
    height: 4px;
    background: var(--surface-2);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.domain-mini-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--accent);
}
.domain-mini-bar-fill.warning {
    background: var(--warning);
}
.domain-task-chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.domain-task-chip {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}
.domain-task-chip.open {
    background: var(--surface-2);
    color: var(--text-muted);
}
.domain-task-chip.progress {
    background: var(--info-bg);
    color: var(--info);
}
.domain-task-chip.done {
    background: var(--success-bg);
    color: var(--success);
}
/* quick links */

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.quick-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    text-decoration: none;
    transition: box-shadow .15s, border-color .15s, transform .15s;
}
.quick-link:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-mid);
    transform: translateY(-1px);
}
.quick-link-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.quick-link-icon svg {
    width: 16px;
    height: 16px;
}
.quick-link-label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
}
.quick-link-sub {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 1px;
    line-height: 1.4;
}
/* recent activity */

.activity-list {
    padding: 4px 0;
}
.activity-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 20px;
    border-bottom: 1px solid var(--border);
    transition: background .12s;
}
.activity-row:last-child {
    border-bottom: none;
}
.activity-row:hover {
    background: color-mix(in srgb, var(--bg) 55%, transparent);
}
.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}
.activity-dot.hours {
    background: var(--accent);
}
.activity-dot.status {
    background: var(--info);
}
.activity-dot.invoice {
    background: var(--warning);
}
.activity-dot.done {
    background: var(--success);
}
.activity-body {
    flex: 1;
    min-width: 0;
}
.activity-desc {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.4;
}
.activity-desc strong {
    color: var(--text-primary);
    font-weight: 600;
}
.activity-time {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 2px;
}
.activity-hours {
    font-family: 'Cormorant Garamond', serif;
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -.02em;
    white-space: nowrap;
    flex-shrink: 0;
}
/* card shared */

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    margin-bottom: 20px;
}
.dash-card:last-child {
    margin-bottom: 0;
}
.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 12px;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}
.dash-card-title {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-card-title svg {
    width: 15px;
    height: 15px;
    color: var(--accent);
}
.dash-card-sub {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 2px;
}
/* welcome banner (right column) */

.welcome-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    margin-bottom: 20px;
}
.welcome-card-top {
    background: linear-gradient(135deg, var(--accent-dim) 0%, color-mix(in srgb, var(--accent) 8%, white) 100%);
    padding: 20px;
    border-bottom: 1px solid var(--accent-mid);
}
.welcome-greeting {
    font-family: 'Cormorant Garamond', serif;
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--accent-hover);
    letter-spacing: -.02em;
    line-height: 1.2;
}
.welcome-sub {
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    margin-top: 4px;
}
.welcome-body {
    padding: 16px 20px;
}
/* billing history in right col */

.bh-row-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}
.bh-row-mini:last-child {
    border-bottom: none;
}
.bh-month {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-primary);
}
.bh-amount {
    font-family: 'Cormorant Garamond', serif;
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -.02em;
}
.task-mini-row {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    transition: background .12s;
}
.task-mini-row:last-child {
    border-bottom: none;
}
.task-mini-row:hover {
    background: var(--surface-2);
}
@media (max-width: 1100px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 900px) {
    .stat-strip {
        grid-template-columns: 1fr 1fr;
    }
    .quick-links-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 600px) {
    .stat-strip {
        grid-template-columns: 1fr 1fr;
    }
    .quick-links-grid {
        grid-template-columns: 1fr 1fr;
    }
    .domain-grid {
        grid-template-columns: 1fr;
    }
}
/* ── PDF Template (hidden, only used for html2pdf) ─────────── */

#pdf-template {
    display: none;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 10px;
    color: #101828;
    background: #fff;
    width: 750px;
    padding: 32px;
    box-sizing: border-box;
}
/* Header bar */

.pdf-header {
    background: #2a9d8f;
    border-radius: 6px;
    padding: 20px 24px;
    overflow: hidden;
    margin-bottom: 16px;
    box-sizing: border-box;
    width: 100%;
}
.pdf-logo {
    float: left;
    width: 60%;
}
.pdf-logo-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.2;
    color: #fff;
}
.pdf-logo-sub {
    font-size: 10px;
    opacity: .8;
    margin-top: 4px;
    color: #fff;
}
.pdf-inv-ref {
    float: right;
    text-align: right;
    width: 40%;
}
.pdf-inv-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    opacity: .65;
    text-transform: uppercase;
    color: #fff;
}
.pdf-inv-num {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}
.pdf-inv-period {
    font-size: 9px;
    opacity: .7;
    margin-top: 2px;
    color: #fff;
}
/* Meta strip */

.pdf-meta {
    width: 100%;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
    box-sizing: border-box;
    display: table;
    table-layout: fixed;
}
.pdf-meta-cell {
    display: table-cell;
    padding: 10px 14px;
    background: #f5f6f8;
    border-right: 1px solid #e4e7ec;
    vertical-align: top;
}
.pdf-meta-cell:last-child {
    border-right: none;
}
.pdf-meta-cell.status-cell {
    background: #fffaeb;
}
.pdf-meta-label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #98a2b3;
    margin-bottom: 5px;
}
.pdf-meta-val {
    font-size: 12px;
    font-weight: 600;
    color: #101828;
}
.pdf-meta-val.unpaid {
    color: #f79009;
}
.pdf-meta-val.paid {
    color: #12b76a;
}
.pdf-meta-val.overdue {
    color: #f04438;
}
/* From / To */

.pdf-parties {
    width: 100%;
    overflow: hidden;
    margin-bottom: 16px;
    box-sizing: border-box;
}
.pdf-from, .pdf-to {
    width: 48%;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    padding: 14px 16px;
    box-sizing: border-box;
}
.pdf-from {
    float: left;
    background: #2a9d8f;
    border-color: #2a9d8f;
}
.pdf-to {
    float: right;
    background: #fff;
}
.pdf-party-label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 6px;
}
.pdf-from .pdf-party-label {
    color: rgba(255, 255, 255, .6);
}
.pdf-to .pdf-party-label {
    color: #98a2b3;
}
.pdf-party-company {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
}
.pdf-from .pdf-party-company {
    color: #fff;
}
.pdf-to .pdf-party-company {
    color: #101828;
}
.pdf-party-detail {
    font-size: 10px;
    line-height: 1.7;
}
.pdf-from .pdf-party-detail {
    color: rgba(255, 255, 255, .85);
}
.pdf-to .pdf-party-detail {
    color: #475467;
}
/* Line items table */

/* Line items table */

.pdf-items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    border: 1px solid #e4e7ec;
}
.pdf-items thead tr {
    background: #1f7a6e !important;
}
.pdf-items thead th {
    background: #1f7a6e;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 8px 10px;
    text-align: left;
    border: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
.pdf-items thead th.r {
    text-align: right;
}
.pdf-items tbody tr {
    border-bottom: 1px solid #e4e7ec;
}
.pdf-items tbody tr:nth-child(even) {
    background: #f5f6f8;
}
.pdf-items tbody tr:nth-child(odd) {
    background: #fff;
}
.pdf-items tbody tr:last-child {
    border-bottom: none;
}
.pdf-items tbody td {
    padding: 8px 10px;
    font-size: 10px;
    vertical-align: middle;
    border: none;
}
.pdf-items .task-name {
    font-weight: 600;
    font-size: 11px;
    color: #101828;
}
.pdf-items .task-desc {
    font-size: 9px;
    color: #98a2b3;
    margin-top: 2px;
}
.pdf-items .type-dev {
    color: #0ea5e9;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.pdf-items .type-mnt {
    color: #98a2b3;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.pdf-items .r {
    text-align: right;
}
.pdf-items .amt {
    font-weight: 700;
    text-align: right;
    color: #101828;
}
/* Bottom section */

.pdf-bottom {
    width: 100%;
    overflow: hidden;
    margin-bottom: 16px;
}
.pdf-summary-col {
    float: left;
    width: 55%;
    padding-right: 20px;
    box-sizing: border-box;
}
.pdf-totals-col {
    float: right;
    width: 45%;
    box-sizing: border-box;
}
.pdf-summary-title {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #98a2b3;
    margin-bottom: 8px;
}
.pdf-summary-row {
    padding: 5px 0;
    border-bottom: 1px solid #e4e7ec;
    color: #475467;
    font-size: 10px;
    overflow: hidden;
}
.pdf-summary-row:last-child {
    border-bottom: none;
}
.pdf-summary-row.bold {
    font-weight: 700;
    color: #101828;
}
.pdf-summary-row span:first-child {
    float: left;
}
.pdf-summary-row span:last-child {
    float: right;
}
.pdf-notes {
    margin-top: 14px;
    clear: both;
}
.pdf-notes-title {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #98a2b3;
    margin-bottom: 6px;
}
.pdf-notes-body {
    font-size: 10px;
    color: #475467;
    line-height: 1.7;
    white-space: pre-line;
}
.pdf-totals-row {
    padding: 5px 0;
    color: #475467;
    font-size: 10px;
    border-bottom: 1px solid #e4e7ec;
    overflow: hidden;
}
.pdf-totals-row:last-of-type {
    border-bottom: none;
    margin-bottom: 10px;
}
.pdf-totals-row span:first-child {
    float: left;
}
.pdf-totals-row span:last-child {
    float: right;
}
.pdf-total-due {
    background: #2a9d8f;
    border-radius: 6px;
    padding: 14px 16px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    clear: both;
}
.pdf-total-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, .7);
    text-transform: uppercase;
    letter-spacing: .06em;
    float: left;
}
.pdf-total-amount {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.02em;
    float: right;
}
/* Footer */

.pdf-footer {
    border-top: 1px solid #e4e7ec;
    padding-top: 10px;
    overflow: hidden;
    font-size: 9px;
    color: #98a2b3;
    width: 100%;
    clear: both;
}
.pdf-footer span:first-child {
    float: left;
}
.pdf-footer span:last-child {
    float: right;
}
/* Clearfix utility */

.clearfix:after {
    content: "";
    display: table;
    clear: both;
}