:root {
    --primary: #111111;
    --secondary: #ffffff;
    --background: #f7f6f1;
    --surface: #ffffff;
    --accent: #f3f1e8;
    --success: #059669;
    --success-light: #d1fae5;
    --error: #dc2626;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: rgba(0, 0, 0, 0.08);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --font: 'Sora', sans-serif;
    --vibrant: #e35e30; /* Vibrant terracotta orange accent */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background-color: var(--background);
    color: var(--primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ======================== ANIMATIONS ======================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* ======================== HEADER ======================== */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-img {
    height: 42px;
    width: auto;
    mix-blend-mode: multiply;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-badge {
    background: var(--accent);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--primary);
    color: var(--secondary);
}

.user-profile {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    text-align: right;
}

.header-greeting {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.92rem;
    max-width: 360px;
    line-height: 1.25;
}

/* ======================== LOGIN VIEW ======================== */
.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0;
    min-height: 100vh;
}

.login-split-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.login-left-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    padding: 40px;
}

.login-left-content {
    max-width: 440px;
    width: 100%;
    animation: fadeIn 0.4s ease-out;
}

.login-forms-wrapper {
    max-width: 560px;
    width: 100%;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.inline-form-link,
.login-switch-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.inline-form-link {
    flex-shrink: 0;
    font-size: 0.8rem;
}

.login-switch-text {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

.form-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.login-right-pane {
    flex: 1;
    background-image: url('fotos/Inicio sesion.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #0b0b0b; /* Deep premium dark background to match the mockup logo theme */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
    color: var(--secondary);
}

.login-right-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 17, 17, 0.9) 0%, rgba(17, 17, 17, 0.2) 100%);
    z-index: 1;
}

.login-right-text {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.login-right-text h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.login-right-text p {
    font-size: 1.1rem;
    opacity: 0.85;
}

.btn-google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font);
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-google-login:hover {
    background: var(--background);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.login-divider:not(:empty)::before {
    margin-right: .5em;
}

.login-divider:not(:empty)::after {
    margin-left: .5em;
}

.login-card {
    background: var(--surface);
    border: none;
    border-radius: 0;
    padding: 0;
    max-width: 100%;
    width: 100%;
    box-shadow: none;
    animation: none;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: left;
}

.login-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 30px;
    text-align: left;
}

@media (max-width: 900px) {
    header {
        align-items: flex-start;
        gap: 16px;
        padding: 16px 20px;
    }

    .user-profile {
        gap: 8px;
    }

    .header-greeting {
        width: 100%;
        max-width: 260px;
        font-size: 0.82rem;
    }

    .login-right-pane {
        display: none;
    }
}

.form-tabs {
    display: flex;
    background: var(--accent);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--surface);
    color: var(--vibrant);
    border-bottom: 2px solid var(--vibrant);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: var(--font);
    font-size: 0.95rem;
    transition: all 0.2s;
    background: var(--surface);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--secondary);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.demo-credentials {
    background: var(--accent);
    padding: 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-top: 24px;
    color: var(--text-light);
}

.demo-credentials strong {
    color: var(--primary);
}

/* ======================== PORTAL MAIN VIEW ======================== */
.portal-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 18px 40px 40px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

.client-nav-tabs {
    position: sticky;
    top: 71px;
    z-index: 80;
    background: var(--background);
}

/* ======================== DOMINO TRACKING SYSTEM ======================== */
.tracking-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.tracking-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.dominoes-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.domino-tile {
    flex: 1;
    min-width: 160px;
    background: var(--accent);
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

.domino-tile::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    transform: translateY(-50%);
}

.domino-num {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 24px;
    z-index: 2;
    background: var(--accent);
    padding: 0 10px;
}

.domino-label {
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 2;
    background: var(--accent);
    padding: 0 5px;
}

/* Active State */
.domino-tile.active {
    background: var(--primary);
    color: var(--secondary);
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.domino-tile.active::before {
    border-top-color: rgba(255, 255, 255, 0.15);
}

.domino-tile.active .domino-num, .domino-tile.active .domino-label {
    background: var(--primary);
}

/* Completed State */
.domino-tile.completed {
    border-color: var(--success);
    background: var(--success-light);
    color: var(--success);
}

.domino-tile.completed::before {
    border-top-color: rgba(5, 150, 105, 0.15);
}

.domino-tile.completed .domino-num, .domino-tile.completed .domino-label {
    background: var(--success-light);
}

/* ======================== WORKSPACE GRID ======================== */
.workspace-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
}

@media (max-width: 1024px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.panel-title {
    font-size: 1.2rem;
    font-weight: 700;
}

/* ======================== EDITABLE INVOICE ======================== */
.invoice-container {
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 30px;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.02);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.invoice-logo {
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.invoice-title {
    text-align: right;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-light);
}

.invoice-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.invoice-meta strong {
    color: var(--primary);
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.invoice-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid var(--primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-light);
}

.invoice-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.invoice-table input {
    border: 1px dashed var(--text-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--font);
    font-size: 0.9rem;
    width: 100%;
}

.invoice-table input:focus {
    outline: none;
    border-style: solid;
    border-color: var(--primary);
}

.invoice-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    font-size: 0.95rem;
}

.invoice-totals .row {
    display: flex;
    width: 240px;
    justify-content: space-between;
}

.invoice-totals .row.grand-total {
    border-top: 2px solid var(--primary);
    padding-top: 8px;
    font-weight: 700;
    font-size: 1.25rem;
}

.btn-add-item {
    background: transparent;
    border: 1px dashed var(--primary);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    align-self: flex-start;
}

.btn-add-item:hover {
    background: var(--accent);
}

.btn-checkout {
    background: var(--success);
    color: var(--secondary);
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    font-family: var(--font);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.2);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.35);
}

.btn-checkout:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ======================== FILE UPLOAD (ASSEMBLY LOOK) ======================== */
.upload-dropzone {
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.upload-dropzone:hover {
    border-color: var(--primary);
    background: var(--accent);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.upload-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

.upload-link-group {
    display: flex;
    gap: 10px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.file-item {
    background: var(--accent);
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.file-name {
    font-weight: 600;
    text-decoration: none;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-name:hover {
    text-decoration: underline;
}

.btn-delete-file {
    background: transparent;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-weight: 600;
}

/* ======================== CHECKOUT DRAWER / OVERLAY ======================== */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    justify-content: flex-end;
}

.checkout-drawer {
    background: var(--surface);
    width: 100%;
    max-width: 480px;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow-y: auto;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.drawer-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card-number-wrapper {
    position: relative;
}

.payment-sum {
    background: var(--accent);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

/* ======================== ADMIN DASHBOARD ======================== */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.admin-table-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    padding: 16px;
    border-bottom: 2px solid var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-light);
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.admin-table tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.presupuesto { background: #fef3c7; color: #d97706; }
.status-badge.pago_pendiente_verificacion { background: #ffedd5; color: #ea580c; }
.status-badge.pago { background: #d1fae5; color: #059669; }
.status-badge.delineacion { background: #dbeafe; color: #2563eb; }
.status-badge.control { background: #f3e8ff; color: #7c3aed; }
.status-badge.correccion { background: #fff7ed; color: #c2410c; }
.status-badge.entregado { background: #f3f4f6; color: #111111; }

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn-admin-view {
    background: var(--accent);
    border: none;
    color: var(--primary);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-admin-view:hover {
    background: var(--primary);
    color: var(--secondary);
}

.btn-video-call {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #25d366;
    border-radius: 10px;
    background: #ecfdf5;
    color: #047857;
    font-family: var(--font);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-video-call:hover {
    background: #d1fae5;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 211, 102, 0.16);
}

.btn-video-call.compact {
    width: auto;
    padding: 7px 10px;
    font-size: 0.78rem;
}

/* ======================== GENERIC ALERTS & BADGES ======================== */
.badge-success {
    background: var(--success-light);
    color: var(--success);
    border-radius: 12px;
    padding: 16px;
    font-weight: 600;
    text-align: center;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.badge-info {
    background: var(--accent);
    color: var(--primary);
    border-radius: 12px;
    padding: 16px;
    font-weight: 600;
    text-align: center;
}

.badge-error {
    background: #fee2e2;
    color: var(--error);
    border-radius: 12px;
    padding: 16px;
    font-weight: 600;
    text-align: center;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ======================== WELCOME / HOME ======================== */
.client-help-whatsapp {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 90;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    padding: 13px 18px;
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.28);
}

.welcome-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    min-height: 460px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.welcome-copy {
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.welcome-eyebrow {
    color: var(--vibrant);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.welcome-copy h1 {
    font-size: 2.4rem;
    line-height: 1.1;
}

.welcome-copy p {
    color: var(--text-light);
    font-size: 1rem;
}

.welcome-image {
    width: 100%;
    height: 100%;
    min-height: 460px;
    object-fit: cover;
}

.welcome-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.welcome-steps div,
.welcome-steps button {
    background: var(--accent);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.welcome-steps button {
    font-family: var(--font);
    color: var(--primary);
    cursor: pointer;
    text-align: left;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.welcome-steps button:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.welcome-steps strong {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: var(--secondary);
    font-size: 0.8rem;
}

.active-project-cta {
    background: var(--primary);
    color: var(--secondary);
    border-radius: 18px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-shadow: var(--shadow);
}

.active-project-cta div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.active-project-cta strong {
    font-size: 1.05rem;
}

.active-project-cta span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.88rem;
}

.active-project-cta .btn-submit {
    width: auto;
    margin-top: 0;
    background: var(--secondary);
    color: var(--primary);
    padding: 12px 18px;
    white-space: nowrap;
}

.welcome-steps span {
    color: var(--text);
    font-size: 0.86rem;
}

.admin-home-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.metric-card span {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.metric-card strong {
    font-size: 2rem;
}

.activity-list,
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item,
.comment-item {
    background: var(--accent);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}

.comment-item.admin-reply {
    border-left: 3px solid var(--success);
    background: #f0fdf4;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.activity-item p,
.comment-item p {
    color: var(--text);
    font-size: 0.9rem;
    margin-top: 4px;
}

.activity-item span,
.activity-item time,
.comment-meta span {
    color: var(--text-light);
    font-size: 0.78rem;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

@media (max-width: 900px) {
    .portal-main {
        padding: 14px 14px 88px;
        gap: 18px;
    }

    .client-nav-tabs,
    .admin-nav-tabs {
        position: sticky;
        top: 73px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        scrollbar-width: thin;
    }

    .client-nav-tabs .tab-btn,
    .admin-nav-tabs .tab-btn {
        white-space: nowrap;
        min-width: max-content;
        padding: 9px 14px !important;
    }

    .tracking-container,
    .panel-card,
    .admin-table-container {
        border-radius: 14px;
        padding: 18px;
    }

    .dominoes-wrapper {
        gap: 10px;
        padding-bottom: 12px;
    }

    .domino-tile {
        min-width: 132px;
        padding: 14px 10px;
    }

    .invoice-container {
        padding: 16px;
        overflow-x: auto;
    }

    .invoice-table {
        min-width: 560px;
    }

    .admin-table {
        min-width: 760px;
    }

    #adminUsersSection {
        grid-template-columns: 1fr !important;
    }

    #adminDetailPanel > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .activity-item,
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    header {
        padding: 12px 14px;
    }

    .logo-container span {
        font-size: 0.95rem !important;
    }

    .welcome-hero,
    .admin-home-grid,
    .welcome-steps {
        grid-template-columns: 1fr;
    }

    .welcome-copy {
        padding: 28px;
    }

    .welcome-copy h1 {
        font-size: 1.8rem;
    }

    .welcome-image {
        min-height: 300px;
    }

    .active-project-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .active-project-cta .btn-submit {
        width: 100%;
    }

    .client-help-whatsapp {
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 560px) {
    .portal-main {
        padding-left: 10px;
        padding-right: 10px;
    }

    .panel-card,
    .tracking-container,
    .admin-table-container {
        padding: 14px;
    }

    .panel-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .tracking-title,
    .panel-title {
        font-size: 1rem;
    }

    .active-project-cta {
        padding: 16px;
    }

    .welcome-copy {
        padding: 22px;
    }

    .welcome-image {
        min-height: 220px;
    }
}
