/**
 * Client Portal Styles - CS Theme System
 * Tokens: dark theme, pink #FF2D7D, cyan #00F0FF, emerald #10B981, card #0d0d13
 */

.cs-portal-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #F2F4FA;
    box-sizing: border-box;
}

.cs-portal-wrapper * {
    box-sizing: border-box;
}

/* Auth Card (Logged Out) */
.cs-portal-auth-card {
    max-width: 480px;
    margin: 60px auto;
    background: #0d0d13;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 40px 36px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    text-align: left;
}

.cs-portal-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.cs-portal-pill .cs-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00F0FF;
}

.cs-portal-pill .cs-dot.active {
    background: #10B981;
    box-shadow: 0 0 8px #10B981;
}

.cs-portal-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.cs-portal-sub {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 28px 0;
}

.cs-portal-login-form .cs-pform-group {
    margin-bottom: 18px;
}

.cs-portal-login-form label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.cs-portal-login-form input[type="text"],
.cs-portal-login-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    background: #12121a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.cs-portal-login-form input:focus {
    border-color: #FF2D7D;
}

.cs-pform-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.cs-pform-remember {
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.cs-pform-lost {
    color: #00F0FF;
    text-decoration: none;
    font-weight: 500;
}

.cs-pform-btn {
    width: 100%;
    padding: 13px;
    background: #FF2D7D;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 45, 125, 0.35);
    transition: all 0.2s;
}

.cs-pform-btn:hover {
    background: #e0266e;
    box-shadow: 0 6px 20px rgba(255, 45, 125, 0.5);
}

.cs-portal-auth-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-portal-auth-footer a {
    color: #FF2D7D;
    text-decoration: none;
    font-weight: 600;
}

/* Logged-in Portal */
.cs-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 32px;
}

.cs-portal-h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.cs-portal-lead {
    font-size: 15px;
    color: #94a3b8;
    margin: 0;
}

.cs-portal-actions {
    display: flex;
    gap: 12px;
}

.cs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.2s;
}

.cs-btn-pink { background: #FF2D7D; color: #ffffff; box-shadow: 0 4px 14px rgba(255, 45, 125, 0.35); }
.cs-btn-pink:hover { background: #e0266e; }
.cs-btn-cyan { background: #00F0FF; color: #08080c; }
.cs-btn-dark { background: rgba(255, 255, 255, 0.06); color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.12); }
.cs-btn-dark:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }

/* Stats Strip */
.cs-portal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.cs-stat-box {
    background: #0d0d13;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
}

.cs-stat-val {
    display: block;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
    color: #ffffff;
}

.cs-val-pink { color: #FF2D7D; }
.cs-val-cyan { color: #00F0FF; }
.cs-val-emerald { color: #10B981; }

.cs-stat-lbl {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    font-family: monospace;
    text-transform: uppercase;
}

/* Sections */
.cs-portal-section {
    background: #0d0d13;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 32px;
}

.cs-psection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cs-psection-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.cs-psection-badge {
    font-size: 12px;
    font-family: monospace;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Projects Grid */
.cs-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.cs-project-card {
    background: #12121a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
}

.cs-pcard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cs-pcard-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.cs-pcard-type {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 16px 0;
}

.cs-prd-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 14px;
    margin-top: 12px;
}

.cs-prd-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 8px;
    color: #cbd5e1;
}

.cs-prd-content {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 12px;
}

.cs-signed-badge {
    color: #10B981;
    font-weight: 700;
    font-size: 12px;
    font-family: monospace;
}

/* Ticket List */
.cs-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-ticket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #12121a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.cs-ticket-item:hover {
    border-color: rgba(255, 45, 125, 0.3);
}

.cs-ticket-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cs-ticket-id {
    font-family: monospace;
    font-size: 12px;
    color: #00F0FF;
}

.cs-ticket-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #ffffff;
}

.cs-ticket-time {
    font-size: 12px;
    color: #64748b;
    font-family: monospace;
}

.cs-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.cs-empty-state p {
    margin-bottom: 16px;
}

/* Badges */
.cs-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.05);
}

.cs-priority-critical, .cs-priority-high { color: #FF2D7D; background: rgba(255, 45, 125, 0.15); }
.cs-priority-medium { color: #00F0FF; background: rgba(0, 240, 255, 0.1); }
.cs-status-open { color: #FF2D7D; }
.cs-status-resolved { color: #10B981; }
