/* Task IT Helpdesk — strona klienta. Spójna z offer_public.html i taskit.pl */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f6f8fa;
    color: #1f2328;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #0969da; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER (czarny — jak offer_public.html) ===== */
.hd-header {
    background: #0e1117;
    color: #fff;
    padding: 18px 0;
    border-bottom: 1px solid #21262d;
}
.hd-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.hd-logo {
    font-size: 21px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
}
.hd-logo span { color: #58a6ff; }
.hd-logo small {
    margin-left: 10px;
    padding: 2px 10px;
    background: rgba(88,166,255,0.12);
    color: #58a6ff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.hd-nav-links {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 14px;
    flex-wrap: wrap;
}
.hd-nav-links a {
    color: #c9d1d9;
    padding: 7px 12px;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.hd-nav-links a:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
    text-decoration: none;
}
.hd-nav-cta {
    background: #1f6feb !important;
    color: #fff !important;
}
.hd-nav-cta:hover { background: #388bfd !important; }
.hd-nav-muted { color: #8b949e !important; font-size: 12px !important; }
.hd-user-chip {
    color: #8b949e;
    font-size: 13px;
    padding: 7px 12px;
}
.hd-user-chip strong { color: #fff; font-weight: 500; }

/* ===== CONTAINER ===== */
.hd-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px;
    width: 100%;
    flex: 1;
}
.hd-wrap-narrow {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 24px;
    width: 100%;
    flex: 1;
}

/* ===== HEADINGS ===== */
h1, h2, h3 {
    color: #1f2328;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 12px;
}
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
.hd-lead {
    color: #656d76;
    font-size: 15px;
    margin: 0 0 24px;
}

/* ===== CARDS ===== */
.hd-card {
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
}
.hd-card-tight { padding: 16px 18px; }
.hd-card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 14px;
    color: #1f2328;
}

/* ===== FORM ===== */
.hd-field { margin-bottom: 16px; }
.hd-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #656d76;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.hd-hint {
    font-size: 12px;
    color: #8b949e;
    margin-top: 4px;
}
.hd-input,
.hd-textarea,
.hd-select {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2328;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    transition: border-color .15s, box-shadow .15s;
}
.hd-input:focus,
.hd-textarea:focus,
.hd-select:focus {
    outline: none;
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9,105,218,0.15);
}
.hd-textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

/* ===== BUTTONS ===== */
.hd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #1f6feb;
    border: 1px solid #1f6feb;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    text-decoration: none;
}
.hd-btn:hover {
    background: #388bfd;
    border-color: #388bfd;
    color: #fff;
    text-decoration: none;
}
.hd-btn-dark {
    background: #0e1117;
    border-color: #0e1117;
}
.hd-btn-dark:hover {
    background: #1a2030;
    border-color: #1a2030;
}
.hd-btn-secondary {
    background: #f6f8fa;
    color: #1f2328;
    border: 1px solid #d0d7de;
}
.hd-btn-secondary:hover {
    background: #eaeef2;
    color: #1f2328;
    border-color: #c0c7ce;
}
.hd-btn-sm { padding: 6px 12px; font-size: 12px; }
.hd-btn-block { width: 100%; }

/* ===== ALERTS ===== */
.hd-alert {
    padding: 11px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.hd-alert-error  { background: #ffebe9; border-color: #ffcdc8; color: #82071e; }
.hd-alert-success{ background: #dafbe1; border-color: #b8f2c4; color: #116329; }
.hd-alert-info   { background: #ddf4ff; border-color: #b6e3ff; color: #0a3069; }

/* ===== TOOLBAR ===== */
.hd-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

/* ===== FILTER CHIPS ===== */
.hd-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}
.hd-chip {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #656d76;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}
.hd-chip:hover {
    background: #f6f8fa;
    color: #1f2328;
    text-decoration: none;
    border-color: #afb8c1;
}
.hd-chip.active {
    background: #0e1117;
    color: #fff;
    border-color: #0e1117;
}
.hd-chip.active:hover { background: #0e1117; color: #fff; }

/* ===== TICKET LIST ===== */
.hd-ticket-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.hd-ticket-item {
    display: block;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    color: #1f2328;
    transition: border-color .15s, box-shadow .15s;
}
.hd-ticket-item:hover {
    text-decoration: none;
    border-color: #1f6feb;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.hd-ticket-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.hd-ticket-num {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 12px;
    color: #656d76;
}
.hd-ticket-title {
    flex: 1;
    min-width: 180px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2328;
}
.hd-ticket-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #656d76;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.hd-ticket-meta strong { color: #1f2328; font-weight: 500; }

/* ===== BADGES ===== */
.hd-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.hd-badge-type {
    background: #f6f8fa;
    color: #656d76;
    border: 1px solid #d0d7de;
}

/* ===== TICKET DETAIL ===== */
.hd-ticket-header {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #d0d7de;
}
.hd-ticket-header h1 {
    margin: 8px 0 12px;
}
.hd-back-link {
    display: inline-block;
    font-size: 13px;
    color: #656d76;
    margin-bottom: 8px;
}
.hd-back-link:hover { color: #1f2328; text-decoration: none; }

.hd-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.hd-meta-cell {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 10px 12px;
}
.hd-meta-label {
    font-size: 10px;
    color: #656d76;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 4px;
}
.hd-meta-value {
    font-size: 13px;
    color: #1f2328;
    font-weight: 500;
}

/* ===== MESSAGES ===== */
.hd-thread { margin: 22px 0; }
.hd-msg {
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 10px;
}
.hd-msg-admin {
    background: #ddf4ff;
    border-color: #b6e3ff;
}
.hd-msg-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    gap: 8px;
    flex-wrap: wrap;
}
.hd-msg-author { font-weight: 600; color: #1f2328; }
.hd-msg-author-admin { color: #0969da; }
.hd-msg-time { color: #8b949e; font-size: 12px; }
.hd-msg-body {
    color: #1f2328;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ===== ATTACHMENTS ===== */
.hd-attachment-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}
.hd-attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}
.hd-attachment-item a { color: #1f2328; flex: 1; }
.hd-attachment-item a:hover { color: #0969da; }
.hd-attachment-size { color: #8b949e; font-size: 12px; }

/* ===== HOME ===== */
.hd-hero {
    text-align: center;
    padding: 60px 20px 48px;
}
.hd-hero h1 {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}
.hd-hero p {
    font-size: 16px;
    color: #656d76;
    max-width: 540px;
    margin: 0 auto 28px;
}
.hd-hero-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.hd-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 32px 0;
}
.hd-feature {
    padding: 22px;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
}
.hd-feature h3 {
    margin: 0 0 8px;
    font-size: 15px;
}
.hd-feature p {
    margin: 0;
    color: #656d76;
    font-size: 13px;
    line-height: 1.55;
}

/* ===== EMPTY STATE ===== */
.hd-empty {
    text-align: center;
    padding: 50px 20px;
    color: #656d76;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
}
.hd-empty h3 { color: #1f2328; margin-bottom: 8px; }

/* ===== UPLOAD ===== */
.hd-upload {
    display: block;
    border: 1.5px dashed #d0d7de;
    border-radius: 6px;
    padding: 18px;
    text-align: center;
    background: #f6f8fa;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.hd-upload:hover {
    border-color: #1f6feb;
    background: #ddf4ff;
}
.hd-upload input[type="file"] { display: none; }
.hd-upload-text {
    color: #656d76;
    font-size: 13px;
}
.hd-upload-text strong { color: #0969da; }

/* ===== FOOTER ===== */
.hd-footer {
    text-align: center;
    padding: 22px 20px;
    color: #8b949e;
    font-size: 12px;
    border-top: 1px solid #d0d7de;
    background: #fff;
    margin-top: 32px;
}
.hd-footer a { color: #8b949e; }

@media (max-width: 640px) {
    .hd-header-inner { padding: 0 16px; }
    .hd-wrap { padding: 18px 16px; }
    .hd-wrap-narrow { padding: 28px 16px; }
    .hd-hero { padding: 40px 16px 32px; }
    .hd-card { padding: 18px; }
    .hd-nav-links a { padding: 6px 8px; font-size: 13px; }
}
