/* =========================================================
   DirtWorks Client Portal — extends ../assets/css/styles.css
   ========================================================= */

.portal-shell {
    min-height: calc(100vh - 80px);
    padding: clamp(28px, 4vw, 56px) 0;
}

/* ---------- Portal header (uses main site header pattern) ---------- */
.portal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0 24px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: clamp(28px, 4vw, 48px);
    flex-wrap: wrap;
}
.portal-bar .who {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(244, 238, 227, 0.85);
    font-size: 0.95rem;
}
.portal-bar .who .avatar {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, rgba(191,32,37,0.5), rgba(10,72,97,0.7));
    color: #fff;
    border-radius: 999px;
    display: grid; place-items: center;
    font-weight: 700;
    border: 1px solid rgba(244,238,227,0.25);
}
.portal-bar .who small { display: block; color: var(--taupe); font-size: 0.78rem; }
.portal-bar .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Auth (login / verify) cards ---------- */
.auth-shell {
    min-height: calc(100vh - 80px);
    display: grid;
    place-items: center;
    padding: 64px 24px;
}
.auth-card {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(135deg, rgba(244, 238, 227, 0.06) 0%, rgba(244, 238, 227, 0.015) 100%);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.auth-card .brand-plate {
    width: 64px; height: 64px;
    margin: 0 auto 18px;
    padding: 10px;
    background: var(--parchment);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.auth-card h1 {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 8px;
    font-weight: 700;
}
.auth-card .lede {
    text-align: center;
    color: rgba(244, 238, 227, 0.7);
    font-size: 0.95rem;
    margin-bottom: 24px;
}
.auth-card .field { margin-bottom: 16px; }
.auth-card button[type=submit] { width: 100%; }
.auth-card .alt-action {
    text-align: center;
    margin-top: 18px;
    font-size: 0.88rem;
    color: var(--taupe);
}
.auth-card .alt-action a { color: var(--sand); }

/* ---------- Project list (dashboard) ---------- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.project-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(244, 238, 227, 0.06) 0%, rgba(244, 238, 227, 0.015) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 22px 22px 18px;
    backdrop-filter: blur(14px);
    transition: transform 0.25s var(--ease-out), border-color 0.2s var(--ease-out);
    text-decoration: none;
    color: inherit;
}
.project-card:hover { transform: translateY(-3px); border-color: rgba(212, 160, 90, 0.4); }
.project-card .row-1 {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    margin-bottom: 10px;
}
.project-card h3 {
    font-size: 1.05rem;
    color: var(--white);
    line-height: 1.3;
    margin: 0;
}
.project-card .meta {
    display: grid; gap: 4px;
    margin-top: 12px;
    color: rgba(244, 238, 227, 0.7);
    font-size: 0.88rem;
}
.project-card .meta .k {
    color: var(--taupe);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    margin-right: 6px;
}

/* ---------- Status badges ---------- */
.badge {
    display: inline-flex; align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge-bidding   { background: rgba(212, 160, 90, 0.15); color: var(--sand); border-color: rgba(212,160,90,0.35); }
.badge-awarded   { background: rgba(60, 130, 80, 0.15);  color: #b6f0c0;     border-color: rgba(60,200,100,0.35); }
.badge-active    { background: rgba(10, 72, 97, 0.4);    color: #b8dde8;     border-color: rgba(60,160,200,0.4); }
.badge-complete  { background: rgba(122, 106, 84, 0.25); color: #d6cdb8;     border-color: rgba(212,160,90,0.25); }
.badge-on-hold   { background: rgba(191, 32, 37, 0.18);  color: #ffb6b8;     border-color: rgba(191,32,37,0.4); }

/* ---------- Project detail ---------- */
.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: clamp(20px, 3vw, 32px);
    align-items: start;
}
@media (max-width: 880px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.detail-head .titlewrap h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.detail-head .titlewrap .breadcrumb {
    color: var(--taupe);
    font-size: 0.85rem;
    margin-bottom: 6px;
}
.detail-head .titlewrap .breadcrumb a { color: var(--sand); }

.section-card {
    background: linear-gradient(135deg, rgba(244, 238, 227, 0.06) 0%, rgba(244, 238, 227, 0.015) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(14px);
    padding: 24px 24px;
    margin-bottom: 18px;
}
.section-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sand);
    margin-bottom: 14px;
}

.kv {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 6px 14px;
    font-size: 0.95rem;
}
.kv .k { color: var(--taupe); font-size: 0.85rem; padding-top: 2px; }
.kv .v { color: var(--white); }
.kv input, .kv textarea, .kv select {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(3, 22, 30, 0.45);
    border: 1px solid var(--glass-border);
    color: var(--white);
    font: inherit;
    font-size: 0.95rem;
}
.kv input:focus, .kv textarea:focus, .kv select:focus {
    outline: none;
    border-color: var(--sand);
    box-shadow: 0 0 0 3px rgba(212, 160, 90, 0.12);
}

/* ---------- File list ---------- */
.file-list { display: grid; gap: 8px; }
.file-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(3, 22, 30, 0.35);
    transition: border-color 0.2s, background 0.2s;
}
.file-row:hover { border-color: rgba(212,160,90,0.4); background: rgba(3, 22, 30, 0.55); }
.file-row .ico {
    width: 36px; height: 36px;
    background: rgba(244, 238, 227, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: grid; place-items: center;
    color: var(--sand);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    flex: 0 0 auto;
}
.file-row .meta { flex: 1; min-width: 0; }
.file-row .name {
    color: var(--white);
    font-size: 0.94rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-row .sub { color: var(--taupe); font-size: 0.78rem; }
.file-row a.dl {
    color: var(--sand); font-size: 0.85rem; font-weight: 600;
    padding: 6px 12px; border: 1px solid rgba(212,160,90,0.3); border-radius: 999px;
    transition: background 0.15s;
}
.file-row a.dl:hover { background: rgba(212,160,90,0.1); }

/* ---------- PDF action buttons ---------- */
.pdf-row { display: grid; gap: 10px; }
.pdf-btn {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--glass-bg-light);
    border: 1px solid var(--glass-border);
    color: var(--white);
    font-size: 0.92rem;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.pdf-btn:hover { border-color: rgba(212,160,90,0.5); background: rgba(244, 238, 227, 0.1); }
.pdf-btn:disabled { opacity: 0.5; cursor: wait; }
.pdf-btn .ico { color: var(--sand); }

/* ---------- Loading skeleton ---------- */
.skeleton {
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, rgba(244,238,227,0.04) 0%, rgba(244,238,227,0.1) 50%, rgba(244,238,227,0.04) 100%);
    background-size: 200% 100%;
    animation: skel 1.4s linear infinite;
    height: 18px;
    width: 100%;
    margin: 6px 0;
}
.skeleton.tall { height: 110px; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Empty state ---------- */
.empty {
    text-align: center;
    padding: 60px 20px;
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--taupe);
}
.empty h3 { color: var(--white); margin-bottom: 8px; }
