/* HiRizzi Projects — Frontend Styles */
:root {
    --hp-primary: #1e3a5f;
    --hp-accent:  #2563eb;
    --hp-green:   #16a34a;
    --hp-bg:      #f8fafc;
    --hp-border:  #e2e8f0;
    --hp-text:    #1e293b;
    --hp-muted:   #64748b;
    --hp-radius:  10px;
}

.hproj-wrap { max-width: 900px; margin: 0 auto; font-family: inherit; color: var(--hp-text); }

/* Header */
.hproj-header   { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.hproj-title    { margin: 0 0 4px; font-size: 1.5rem; font-weight: 800; }
.hproj-subtitle { margin: 0; color: var(--hp-muted); font-size: 0.9rem; }
.hproj-back     { display: inline-block; color: var(--hp-muted); font-size: 0.85rem; margin-bottom: 6px; text-decoration: none; }
.hproj-back:hover { color: var(--hp-accent); }

/* Buttons */
.hproj-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all 0.2s; }
.hproj-btn--primary { background: var(--hp-primary); color: #fff; }
.hproj-btn--primary:hover { background: #152d4a; color: #fff; transform: translateY(-1px); }
.hproj-btn--ghost { background: transparent; color: var(--hp-primary); border: 1.5px solid var(--hp-border); }
.hproj-btn--ghost:hover { border-color: var(--hp-primary); }
.hproj-btn--secure { background: var(--hp-green); color: #fff; }
.hproj-btn--secure:hover { background: #15803d; color: #fff; }

/* Badges */
.hproj-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.hproj-badge--pending     { background: #fef3c7; color: #92400e; }
.hproj-badge--in_review   { background: #dbeafe; color: #1d4ed8; }
.hproj-badge--negotiating { background: #ede9fe; color: #5b21b6; }
.hproj-badge--accepted    { background: #d1fae5; color: #065f46; }
.hproj-badge--in_progress { background: #cffafe; color: #0e7490; }
.hproj-badge--completed   { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }
.hproj-badge--declined    { background: #f1f5f9; color: #64748b; }

/* Meta pills */
.hproj-ticket-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hproj-meta-pill { display: inline-block; background: #f1f5f9; color: var(--hp-muted); font-size: 0.78rem; padding: 3px 10px; border-radius: 20px; }
.hproj-ref { font-size: 0.78rem; background: #f1f5f9; padding: 3px 7px; border-radius: 5px; color: var(--hp-muted); font-family: monospace; }

/* Table */
.hproj-table-wrap { overflow-x: auto; border: 1.5px solid var(--hp-border); border-radius: var(--hp-radius); }
.hproj-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.hproj-table th { background: var(--hp-bg); padding: 12px 16px; text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--hp-muted); border-bottom: 1.5px solid var(--hp-border); }
.hproj-table td { padding: 14px 16px; border-bottom: 1px solid var(--hp-border); vertical-align: middle; }
.hproj-table tr:last-child td { border-bottom: none; }
.hproj-table tr:hover td { background: var(--hp-bg); }
.hproj-date { color: var(--hp-muted); font-size: 0.82rem; }
.hproj-link { color: var(--hp-accent); text-decoration: none; font-weight: 600; }
.hproj-creds-badge { color: var(--hp-green); font-weight: 700; font-size: 0.82rem; text-decoration: none; }
.hproj-creds-locked { color: var(--hp-muted); font-size: 0.82rem; }

/* Empty */
.hproj-empty { text-align: center; padding: 60px 20px; border: 2px dashed var(--hp-border); border-radius: var(--hp-radius); }
.hproj-empty__icon { font-size: 2.5rem; margin-bottom: 12px; }
.hproj-empty h3 { margin: 0 0 8px; }
.hproj-empty p { color: var(--hp-muted); margin: 0 0 20px; }

/* Tabs */
.hproj-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--hp-border); margin-bottom: 24px; flex-wrap: wrap; }
.hproj-tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; text-decoration: none; color: var(--hp-muted); font-size: 0.9rem; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.hproj-tab:hover { color: var(--hp-accent); }
.hproj-tab.active { color: var(--hp-primary); border-bottom-color: var(--hp-primary); }
.hproj-tab--creds.active { color: var(--hp-green); border-bottom-color: var(--hp-green); }
.hproj-tab-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hproj-tab-dot--green  { background: #22c55e; }
.hproj-tab-dot--orange { background: #f59e0b; }

/* Form */
.hproj-form-wrap { background: #fff; border: 1.5px solid var(--hp-border); border-radius: var(--hp-radius); padding: 28px; }
.hproj-form-row  { margin-bottom: 20px; }
.hproj-form-row--2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hproj-form-row--3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.hproj-label    { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.hproj-optional { color: var(--hp-muted); font-weight: 400; font-size: 0.8rem; }
.req { color: #dc2626; }
.hproj-input    { width: 100%; padding: 10px 14px; border: 1.5px solid var(--hp-border); border-radius: 7px; font-size: 0.9rem; box-sizing: border-box; transition: border-color 0.15s; font-family: inherit; }
.hproj-input:focus { outline: none; border-color: var(--hp-accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.hproj-textarea  { resize: vertical; min-height: 120px; }
.hproj-form-footer { display: flex; align-items: center; gap: 16px; margin-top: 4px; flex-wrap: wrap; }
.hproj-creds-hint { font-size: 0.8rem; color: var(--hp-muted); }

/* Credentials note on new form */
.hproj-creds-note { background: #f8fafc; border: 1.5px solid var(--hp-border); border-radius: 8px; padding: 14px 18px; font-size: 0.88rem; color: var(--hp-muted); margin-bottom: 20px; }

/* Thread */
.hproj-thread { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }
.hproj-reply  { display: flex; gap: 14px; }
.hproj-reply__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--hp-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; flex-shrink: 0; }
.hproj-reply--admin .hproj-reply__avatar { background: #1e3a5f; }
.hproj-reply--user  .hproj-reply__avatar { background: #475569; }
.hproj-reply__body  { flex: 1; background: #fff; border: 1.5px solid var(--hp-border); border-radius: var(--hp-radius); padding: 14px 18px; }
.hproj-reply--admin .hproj-reply__body { background: #eff6ff; border-color: #bfdbfe; }
.hproj-reply__meta  { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hproj-reply__meta strong { font-size: 0.9rem; }
.hproj-reply__time  { font-size: 0.78rem; color: var(--hp-muted); }
.hproj-reply__msg   { font-size: 0.9rem; line-height: 1.65; white-space: pre-wrap; }

/* Reply form */
.hproj-reply-form { background: #fff; border: 1.5px solid var(--hp-border); border-radius: var(--hp-radius); padding: 24px; }

/* Details card */
.hproj-details-card { background: #fff; border: 1.5px solid var(--hp-border); border-radius: var(--hp-radius); padding: 24px; }
.hproj-detail-row   { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hp-border); }
.hproj-detail-row:last-child { border-bottom: none; }
.hproj-detail-label { font-size: 0.82rem; font-weight: 700; color: var(--hp-muted); text-transform: uppercase; letter-spacing: 0.04em; width: 120px; flex-shrink: 0; }

/* Credentials section */
.hproj-creds-section { }
.hproj-creds-banner  { display: flex; gap: 14px; background: #f0fdf4; border: 1.5px solid #86efac; border-radius: var(--hp-radius); padding: 16px 20px; margin-bottom: 24px; align-items: flex-start; }
.hproj-creds-banner span { font-size: 1.6rem; flex-shrink: 0; }
.hproj-creds-banner strong { display: block; color: #166534; font-size: 0.95rem; margin-bottom: 4px; }
.hproj-creds-banner p { margin: 0; color: #166534; font-size: 0.85rem; }
.hproj-creds-group  { background: #fff; border: 1.5px solid var(--hp-border); border-radius: var(--hp-radius); padding: 20px 24px; margin-bottom: 16px; }
.hproj-creds-group__title { margin: 0 0 16px; font-size: 0.95rem; font-weight: 700; }
.hproj-pw-wrap   { position: relative; display: flex; align-items: center; }
.hproj-pw-wrap .hproj-input { padding-right: 46px; }
.hproj-pw-toggle { position: absolute; right: 10px; background: none; border: none; cursor: pointer; font-size: 1rem; padding: 4px; color: var(--hp-muted); }
.hproj-pw-toggle:hover { color: var(--hp-text); }

/* Notices */
.hproj-notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; }
.hproj-notice--info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.hproj-notice--warn    { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.hproj-notice--error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.hproj-notice--success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }

/* Responsive */
@media (max-width: 650px) {
    .hproj-form-row--2col, .hproj-form-row--3col { grid-template-columns: 1fr; }
    .hproj-header { flex-direction: column; }
    .hproj-tabs { gap: 0; }
    .hproj-tab { padding: 8px 12px; font-size: 0.82rem; }
}
