/* ===================================================================
   Computer Repair Pro – Cloudflare-inspired dark theme
   =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2128;
    --bg-card-hover: #22272e;
    --bg-input: #0d1117;
    --border: #30363d;
    --border-light: #3d444d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #f6821f;
    --accent-light: #ff9f43;
    --accent-glow: rgba(246, 130, 31, .25);
    --success: #3fb950;
    --warning: #d29922;
    --error: #f85149;
    --info: #58a6ff;
    --purple: #bc8cff;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: .2s cubic-bezier(.4, 0, .2, 1);
    --shadow: 0 8px 32px rgba(0, 0, 0, .4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-light);
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 17, 23, .85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.nav-brand svg {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    height: 64px;
    z-index: 101;
    transition: all var(--transition);
}

.nav-links a {
    color: var(--text-secondary);
    font-size: .9rem;
    font-weight: 500;
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, .06);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border);
    transition: border-color var(--transition);
}

.nav-avatar:hover {
    border-color: var(--accent);
}

.nav-user-name {
    font-size: .85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-mobile-only {
    display: none;
}

.nav-mobile-flex {
    display: none;
}

.nav-toggle {
    display: none;
    position: relative;
    width: 24px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1200;
}

.nav-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.nav-toggle span:nth-child(1) {
    top: 0;
}

.nav-toggle span:nth-child(2) {
    top: 9px;
}

.nav-toggle span:nth-child(3) {
    top: 18px;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

body.no-scroll {
    overflow: hidden;
}

/* ---------- Notifications ---------- */
.notification-container {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
}

.notification-btn:hover {
    color: var(--text-primary);
}

.notification-btn svg {
    width: 24px;
    height: 24px;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--error);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-primary);
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.75rem;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-read-all {
    font-size: 0.8rem;
    color: var(--accent);
    cursor: pointer;
    transition: color var(--transition);
}

.notification-read-all:hover {
    color: var(--accent-light);
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.notification-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: background var(--transition);
}

.notification-item.unread {
    background: rgba(246, 130, 31, 0.05);
}

.notification-item.read {
    opacity: 0.6;
    background: transparent;
}

.notification-item.read p {
    color: var(--text-muted);
}

.notification-item:hover {
    background: var(--bg-secondary);
}

.notification-item p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.notification-item span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.notification-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #e8710a);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.btn-sm {
    padding: .45rem 1rem;
    font-size: .8rem;
}

.btn-google {
    background: #fff;
    color: #3c4043;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    padding: .7rem 1.75rem;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
    color: #3c4043;
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

.btn-logout {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: .45rem 1rem;
    font-size: .8rem;
}

.btn-logout:hover {
    border-color: var(--error);
    color: var(--error);
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    padding: 2.4rem 2rem 5rem;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: .4;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: .7;
        transform: translateX(-50%) scale(1.1);
    }
}

.hero-content {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(246, 130, 31, .1);
    border: 1px solid rgba(246, 130, 31, .25);
    color: var(--accent-light);
    font-size: .8rem;
    font-weight: 600;
    padding: .4rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    letter-spacing: .02em;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Services Grid ---------- */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: .75rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    opacity: 0;
    transition: opacity var(--transition);
}

.service-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(246, 130, 31, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--accent);
    font-size: 1.4rem;
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: .65rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.6;
}

/* ---------- Stats ---------- */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: .35rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: .85rem;
    font-weight: 500;
}

/* ---------- Dashboard ---------- */
.dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

/* ---------- Repair Modal Form ---------- */
.repair-modal {
    margin: auto;
    background: #1c2128;
    /* dark grey matching UI */
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 3rem 3rem;
    width: 90%;
    max-width: 600px;
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

.repair-modal::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
}

.modal-close {
    position: absolute;
    top: -1rem;
    right: -1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--error);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 2.5rem;
}

.modal-icon {
    color: var(--accent);
}

.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.form-step {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: .6rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.disabled-input {
    opacity: 0.7;
    cursor: default;
    background: #161b22;
}

.payment-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.payment-selector:hover {
    border-color: var(--accent);
    background: rgba(246, 130, 31, 0.05);
}

.payment-selector input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
}

.selector-content {
    display: flex;
    flex-direction: column;
}

.selector-title {
    font-weight: 600;
    color: var(--text-primary);
}

.selector-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.error-msg {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 0.4rem;
    min-height: 1.2rem;
}

/* ---------- Repairs List ---------- */
.repairs-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.repairs-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.repair-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    transition: all var(--transition);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 1rem;
}

.repair-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.repair-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: .35rem;
}

.repair-desc {
    color: var(--text-secondary);
    font-size: .9rem;
    margin-bottom: .75rem;
    line-height: 1.55;
}

.repair-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--text-muted);
}

.repair-meta span {
    display: flex;
    align-items: center;
    gap: .3rem;
}

/* ---------- Status Badges ---------- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .9rem;
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
}

.status-pending {
    background: rgba(139, 148, 158, .15);
    color: var(--text-secondary);
    border: 1px solid rgba(139, 148, 158, .25);
}

.status-accepted {
    background: rgba(88, 166, 255, .12);
    color: var(--info);
    border: 1px solid rgba(88, 166, 255, .25);
}

.status-working {
    background: rgba(210, 153, 34, .12);
    color: var(--warning);
    border: 1px solid rgba(210, 153, 34, .25);
}

.status-pickup {
    background: rgba(188, 140, 255, .12);
    color: var(--purple);
    border: 1px solid rgba(188, 140, 255, .25);
}

.status-sending {
    background: rgba(246, 130, 31, .12);
    color: var(--accent-light);
    border: 1px solid rgba(246, 130, 31, .25);
}

.status-waiting {
    background: rgba(139, 148, 158, .12);
    color: var(--text-primary);
    border: 1px solid rgba(139, 148, 158, .25);
}

.status-completed {
    background: rgba(48, 54, 61, .5);
    color: var(--text-muted);
    border: 1px solid rgba(48, 54, 61, .5);
}

.status-declined {
    background: rgba(248, 81, 73, .12);
    color: var(--error);
    border: 1px solid rgba(248, 81, 73, .25);
}

/* ---------- Admin Table ---------- */
.admin-panel {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

.admin-panel h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.admin-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: .95rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.admin-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.admin-stat-num {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
}

.admin-stat-label {
    font-size: .8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.admin-table thead {
    background: var(--bg-secondary);
}

.admin-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: .9rem 1.25rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background var(--transition);
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, .02);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.td-title {
    font-weight: 600;
    max-width: 200px;
}

.td-desc {
    color: var(--text-secondary);
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.td-user {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.td-user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.completed-repair {
    opacity: 0.45;
    filter: grayscale(1);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.completed-repair:hover {
    opacity: 0.8;
    filter: grayscale(0.5);
}

.td-user-info {
    line-height: 1.3;
}

.td-user-name {
    font-weight: 500;
    font-size: .85rem;
}

.td-user-email {
    font-size: .75rem;
    color: var(--text-muted);
}

.status-form {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.status-select {
    appearance: none;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: .4rem .75rem;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .6rem center;
    padding-right: 2rem;
}

.status-select:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-update {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: .4rem .85rem;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-update:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

/* ---------- Print Styles ---------- */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }

    /* Only show elements with .print-visible or the repair-modal when printing */
    body * {
        visibility: hidden !important;
    }

    .print-visible,
    .print-visible *,
    .repair-modal,
    .repair-modal * {
        visibility: visible !important;
    }

    .repair-modal {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: #000 !important;
        border: none !important;
        box-shadow: none !important;
        display: block !important;
    }

    .repair-modal::backdrop {
        display: none !important;
    }

    /* Hide everything inside modal except print-visible */
    .modal-header,
    .modal-close,
    .form-step {
        display: none !important;
    }

    .print-visible {
        display: block !important;
        visibility: visible !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .print-visible * {
        visibility: visible !important;
    }

    .print-document-header {
        display: block !important;
        text-align: center;
        margin-bottom: 2rem;
        border-bottom: 2px solid #000;
        padding-bottom: 1rem;
    }

    .print-document-header:first-child {
        border-bottom: 2px solid #000;
    }
}

/* ---------- InPost Timeline ---------- */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.timeline-icon.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.timeline-title {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: .25rem;
}

.timeline-date {
    font-size: .8rem;
    color: var(--text-muted);
}


/* ---------- Flash Messages ---------- */
.flash-container {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: auto;
    min-width: 300px;
    max-width: 90%;
    pointer-events: none;
}

.flash {
    pointer-events: auto;
    padding: .85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    animation: slideIn .3s ease-out;
    border: 1px solid;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
    backdrop-filter: blur(8px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-success {
    background: rgba(63, 185, 80, .1);
    border-color: rgba(63, 185, 80, .3);
    color: var(--success);
}

.flash-error {
    background: rgba(248, 81, 73, .1);
    border-color: rgba(248, 81, 73, .3);
    color: var(--error);
}

.flash-info {
    background: rgba(88, 166, 255, .1);
    border-color: rgba(88, 166, 255, .3);
    color: var(--info);
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: .4;
}

.empty-state h3 {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: .5rem;
}

.empty-state p {
    font-size: .9rem;
}

/* ---------- Footer ---------- */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: .82rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer a {
    color: var(--text-secondary);
}

.footer a:hover {
    color: var(--accent);
}

.no-scroll {
    overflow: hidden;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 1.25rem;
        z-index: 1300;
        /* Ensure navbar (and toggle) is above menu */
        background: var(--bg-primary);
        /* Solid navbar on mobile */
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 6rem;
        gap: 1.5rem;
        z-index: 1100;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        opacity: 0;
        visibility: hidden;
        overflow-y: auto;
        width: 100%;
        height: 100vh;
        margin: 0 !important;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 0 1.5rem;
    }

    .nav-links a {
        font-size: 1.15rem;
        padding: 1.15rem;
        color: var(--text-primary);
        display: block;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        transition: all var(--transition);
    }

    .nav-links a:hover {
        background: var(--bg-card-hover);
        border-color: var(--accent);
        transform: translateY(-2px);
    }

    .nav-desktop-only {
        display: none !important;
    }

    .nav-mobile-only {
        display: block !important;
        width: 100%;
    }

    .nav-mobile-flex {
        display: flex !important;
        align-items: center;
        gap: 1rem;
    }

    .hero {
        padding: 4rem 1.5rem 3rem;
    }

    .hero-badge {
        font-size: .75rem;
    }

    .section {
        padding: 3rem 1.25rem;
    }

    /* Hide the Zgłoś Naprawę button on tablets/smaller screens */
    @media (max-width: 650px) {
        .nav-user>a.btn-primary.nav-desktop-only {
            display: none !important;
        }
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .repair-card {
        grid-template-columns: 1fr;
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .repair-card>div:last-child {
        align-items: stretch !important;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Modal button stacking */
    .form-step div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .form-step .btn {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .dashboard {
        padding: 1.5rem 1rem 3rem;
        overflow-x: hidden;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .form-step>div[style*="display: flex"] {
        flex-wrap: wrap;
    }

    .form-step>div[style*="justify-content: center"] {
        flex-wrap: wrap;
    }

    .repair-modal .modal-content {
        padding: 1.5rem;
        margin: 0.5rem;
    }

    .admin-panel {
        padding: 1.5rem 1rem 3rem;
    }

    /* Admin Table to Cards */
    .admin-table thead {
        display: none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tr {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 1.5rem;
        padding: 1rem;
    }

    .admin-table td {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: .75rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        max-width: none;
    }

    .admin-table td:last-child {
        border-bottom: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .admin-table td:before {
        content: attr(data-label);
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: var(--text-muted);
        text-align: left;
    }

    .td-title,
    .td-desc {
        max-width: none;
        text-align: right;
    }

    .td-user {
        justify-content: flex-end;
    }

    .btn-update {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    /* Repair Chat Sidebar */
    .chat-layout {
        grid-template-columns: 1fr !important;
    }

    .chat-sidebar {
        margin-top: 2rem;
    }

    /* Modal Adjustments */
    .repair-modal {
        width: 95%;
        padding: 1.5rem;
    }

    .form-step {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .stats-bar {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- Dashboard Enhancements ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns on desktop */
    grid-auto-rows: 1fr;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Empty State Guide */
.empty-state-guide {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4rem 2rem;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.guide-header {
    margin-bottom: 4rem;
}

.guide-icon-round {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--accent);
}

.guide-header h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.guide-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.guide-step-card {
    flex: 1;
    max-width: 250px;
    position: relative;
    padding: 2rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.step-number {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    opacity: 0.5;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
}

.guide-step-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.guide-step-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.guide-arrow {
    padding-top: 4rem;
    color: var(--border);
}

@media (max-width: 1024px) {
    .guide-arrow {
        display: none;
    }

    .guide-steps {
        flex-direction: column;
        align-items: center;
    }

    .guide-step-card {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .empty-state-guide {
        padding: 3rem 1.25rem;
    }

    .guide-header h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 650px) {
    .nav-desktop-only {
        display: none !important;
    }
}