/* Pipeline Portal - custom styles per UI-SPEC */
/* Fonts: Plus Jakarta Sans (body) + DM Sans (display/headings) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ============================================================
   BASE RESET
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: #111827;
    background-color: #F9FAFB;
}

a {
    color: #1570EF;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================================
   PORTAL SHELL
   ============================================================ */

.portal-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================================
   TOP NAV
   ============================================================ */

.portal-topnav {
    height: 56px;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-topnav-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.portal-topnav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.portal-topnav-logo img {
    height: 24px;
    width: auto;
}

.portal-topnav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.portal-topnav-link {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #111827;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.portal-topnav-link:hover {
    color: #1570EF;
    text-decoration: none;
}

.portal-topnav-link.active {
    font-weight: 600;
    color: #1570EF;
}

.portal-topnav-link.muted {
    font-weight: 400;
    color: #9CA3AF;
    cursor: default;
}

.portal-topnav-link.muted:hover {
    color: #9CA3AF;
}

.portal-topnav-right {
    display: flex;
    align-items: center;
}

.portal-topnav-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
}

.portal-topnav-user-name {
    color: #111827;
    font-weight: 400;
}

.portal-topnav-user-signout {
    color: #9CA3AF;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.portal-topnav-user-signout:hover {
    color: #111827;
    text-decoration: none;
}

.portal-topnav-signin {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    background: #1570EF;
    color: #FFFFFF;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.portal-topnav-signin:hover {
    background: #1263D5;
    box-shadow: 0 2px 8px rgba(21, 112, 239, 0.3);
    color: #FFFFFF;
    text-decoration: none;
}

/* ============================================================
   HERO BANNER
   ============================================================ */

.portal-hero {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: -32px;
    background: linear-gradient(135deg, #1570EF, #0F4FC2);
    padding: 48px 64px;
    position: relative;
    overflow: hidden;
}

.portal-hero-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.portal-hero-circle-1 {
    width: 320px;
    height: 320px;
    top: -80px;
    right: -40px;
}

.portal-hero-circle-2 {
    width: 200px;
    height: 200px;
    top: 20px;
    right: 120px;
}

.portal-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.portal-hero-text h1 {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.15;
    margin: 0 0 8px 0;
}

.portal-hero-text p {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0;
}

.portal-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    flex-shrink: 0;
}

.portal-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34D399;
    flex-shrink: 0;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */

.portal-content {
    flex: 1;
    background: #F9FAFB;
    padding: 32px 64px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================================
   NAVIGATION CARDS
   ============================================================ */

.portal-nav-cards {
    display: flex;
    gap: 24px;
}

.portal-nav-card {
    flex: 1;
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    display: block;
}

.portal-nav-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
}

.portal-nav-card.muted {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
}

.portal-nav-card-accent {
    height: 3px;
    width: 100%;
}

.portal-nav-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.portal-nav-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-nav-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.portal-nav-card-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 6px;
}

.portal-nav-card-title {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.portal-nav-card-desc {
    font-size: 13px;
    font-weight: 400;
    color: #9CA3AF;
    line-height: 1.5;
    margin: 0;
}

.portal-nav-card-action {
    font-size: 13px;
    font-weight: 600;
    color: #1570EF;
    text-decoration: none;
    transition: color 0.15s ease;
}

.portal-nav-card-action:hover {
    color: #1263D5;
    text-decoration: none;
}

.portal-nav-card-action.muted-action {
    color: #9CA3AF;
}

/* ============================================================
   COMPANY WARNING
   ============================================================ */

.portal-company-warning {
    display: flex;
    align-items: flex-start;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 12px 16px;
    gap: 12px;
    margin-top: 24px;
}

.portal-company-warning-icon {
    font-size: 16px;
    font-weight: 700;
    color: #92400E;
    flex-shrink: 0;
    line-height: 1.5;
}

.portal-company-warning-content {
    flex: 1;
}

.portal-company-warning-title {
    font-size: 13px;
    font-weight: 600;
    color: #92400E;
    margin: 0 0 4px 0;
}

.portal-company-warning-body {
    font-size: 13px;
    font-weight: 400;
    color: #92400E;
    line-height: 1.5;
    margin: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */

.portal-footer {
    text-align: center;
    padding: 16px 24px;
    font-size: 12px;
    color: #9CA3AF;
    border-top: 1px solid #E5E7EB;
    background: #FFFFFF;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.portal-login-shell {
    min-height: 100vh;
    display: flex;
}

.portal-login-left {
    width: 560px;
    flex-shrink: 0;
    background: linear-gradient(160deg, #1570EF, #0F4FC2);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 48px;
}

.portal-login-left-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.portal-login-left-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.portal-login-left-logo img {
    height: 28px;
    width: auto;
}

.portal-login-left-content {
    position: relative;
    z-index: 1;
}

.portal-login-left-tagline {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.2;
    margin: 0 0 12px 0;
}

.portal-login-left-subtitle {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0;
}

.portal-login-left-footer {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
}

.portal-login-right {
    flex: 1;
    background: #F9FAFB;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.portal-login-form-container {
    width: 100%;
    max-width: 360px;
}

.portal-login-heading {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #111827;
    line-height: 1.15;
    margin: 0 0 8px 0;
}

.portal-login-subtitle {
    font-size: 15px;
    color: #9CA3AF;
    margin: 0 0 32px 0;
}

.portal-login-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.portal-login-error p {
    font-size: 13px;
    color: #EF4444;
    margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .portal-topnav {
        padding: 0 16px;
    }

    .portal-topnav-links {
        display: none;
    }

    .portal-hero {
        padding: 24px 24px;
    }

    .portal-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .portal-content {
        padding: 24px 16px;
    }

    .portal-nav-cards {
        flex-direction: column;
    }

    .portal-login-left {
        display: none;
    }
}

/* ============================================================
   STATUS PAGE
   ============================================================ */

.status-banner-card { background: #fff; border-radius: 12px; border: 1px solid #E5E7EB; padding: 24px; display: flex; align-items: center; gap: 12px; }
.status-banner-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.status-banner-heading { font-family: 'DM Sans', system-ui, sans-serif; font-size: 20px; font-weight: 600; color: #111827; line-height: 1.2; }
.status-banner-subtitle { font-size: 13px; color: #9CA3AF; margin-top: 2px; }

.status-incident-banner { border-radius: 8px; padding: 12px 16px; display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; }
.status-incident-banner-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.status-incident-banner-content { flex: 1; min-width: 0; }
.status-incident-banner-headline { font-size: 15px; font-weight: 600; color: #111827; }
.status-incident-banner-title { font-size: 15px; font-weight: 400; color: #111827; }
.status-incident-banner-update { font-size: 13px; color: #374151; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.status-incident-banner-link { font-size: 13px; font-weight: 600; color: #1570EF; text-decoration: none; white-space: nowrap; align-self: center; }

.status-section-heading { font-family: 'DM Sans', system-ui, sans-serif; font-size: 20px; font-weight: 600; color: #111827; margin-top: 32px; margin-bottom: 16px; }
.status-section-subheading { font-size: 13px; color: #9CA3AF; margin-top: -12px; margin-bottom: 16px; }

.status-components-card { background: #fff; border-radius: 12px; border: 1px solid #E5E7EB; overflow: hidden; }
.status-component-row { display: flex; align-items: center; padding: 16px 24px; gap: 16px; }
.status-component-row + .status-component-row { border-top: 1px solid #F3F4F6; }
.status-component-left { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-component-name { font-size: 15px; font-weight: 600; color: #111827; }

.status-uptime-bars { display: flex; gap: 0; align-items: flex-end; flex: 1; }
.status-uptime-bar { width: 6px; height: 32px; cursor: pointer; }

.status-component-right { min-width: 140px; text-align: right; }
.status-component-label { font-size: 13px; }
.status-component-uptime { font-size: 13px; font-weight: 600; color: #111827; }
.status-component-window { font-size: 13px; color: #9CA3AF; }

.status-month-heading { font-size: 13px; font-weight: 600; color: #6B7280; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 24px; margin-bottom: 12px; }
.status-incident-card { background: #fff; border-radius: 12px; border: 1px solid #E5E7EB; padding: 24px; margin-bottom: 12px; }
.status-incident-title { font-size: 15px; font-weight: 600; color: #111827; }
.status-incident-components { font-size: 13px; color: #6B7280; margin-top: 4px; }
.status-pill { font-size: 13px; font-weight: 600; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; display: inline-block; }

.status-update-timeline { margin-top: 16px; padding-left: 8px; border-left: 2px solid #E5E7EB; }
.status-update-item { padding: 8px 0; }
.status-update-timestamp { font-size: 13px; color: #9CA3AF; }
.status-update-message { font-size: 13px; color: #374151; margin-top: 4px; }

.status-empty-state { text-align: center; padding: 48px 0; font-size: 15px; color: #6B7280; }

/* ============================================================
   KNOWLEDGE BASE
   ============================================================ */

/* KB Search */
.kb-search-input {
    width: 100%;
    max-width: 400px;
    height: 36px;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 15px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    background: #fff;
}
.kb-search-input:focus {
    box-shadow: 0 0 0 3px rgba(21,112,239,0.15);
}
.kb-search-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.kb-search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    font-size: 16px;
    padding: 4px;
}

/* KB Search Results */
.kb-search-result {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    padding: 16px 24px;
    margin-bottom: 8px;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}
.kb-search-result:hover {
    background: #F9FAFB;
}
.kb-search-result-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}
.kb-search-result-breadcrumb {
    font-size: 13px;
    color: #9CA3AF;
    margin-top: 2px;
}
.kb-search-result-excerpt {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* KB Category Grid - wraps into 2 columns unlike portal-nav-cards which is single-row */
.kb-category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.kb-category-grid .portal-nav-card {
    flex: 0 0 calc(50% - 12px);
}

/* KB Category Card extras */
.kb-card-accent {
    height: 3px;
    background: linear-gradient(90deg, #1570EF, #60A5FA);
    border-radius: 12px 12px 0 0;
}
.kb-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #EFF6FF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1570EF;
    font-size: 20px;
}
.kb-card-badge {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #F3F4F6;
    color: #6B7280;
    padding: 2px 8px;
    border-radius: 4px;
}
.kb-card-action {
    font-size: 13px;
    font-weight: 600;
    color: #1570EF;
    text-decoration: none;
}

/* KB Category Listing */
.kb-article-row {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.kb-article-row:hover {
    background: #F9FAFB;
}
.kb-article-row + .kb-article-row {
    border-top: 1px solid #F3F4F6;
}
.kb-article-row-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}
.kb-article-row-action {
    font-size: 13px;
    font-weight: 600;
    color: #1570EF;
    white-space: nowrap;
}

/* KB Breadcrumb */
.kb-breadcrumb {
    font-size: 13px;
    color: #9CA3AF;
    margin-bottom: 16px;
}
.kb-breadcrumb a {
    color: #9CA3AF;
    text-decoration: none;
}
.kb-breadcrumb a:hover {
    color: #1570EF;
}
.kb-breadcrumb-sep {
    margin: 0 6px;
    color: #6B7280;
}

/* KB Article Prose */
.kb-article-container {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    padding: 40px 48px;
    max-width: 800px;
    margin: 0 auto;
}
.kb-article-title {
    font-size: 28px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: #111827;
    line-height: 1.15;
    margin: 0 0 8px 0;
}
.kb-article-meta {
    font-size: 13px;
    color: #9CA3AF;
    margin-bottom: 24px;
}
.kb-article-prose {
    font-size: 15px;
    font-weight: 400;
    color: #374151;
    line-height: 1.7;
}
.kb-article-prose h2 {
    font-size: 20px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
    margin: 32px 0 12px 0;
}
.kb-article-prose h3 {
    font-size: 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
    margin: 24px 0 8px 0;
}
.kb-article-prose code {
    font-size: 13px;
    font-family: monospace;
    background: #F3F4F6;
    border-radius: 4px;
    padding: 2px 6px;
}
.kb-article-prose pre code {
    display: block;
    background: #111827;
    color: #F9FAFB;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    font-size: 13px;
}
.kb-article-prose pre {
    margin: 16px 0;
}
.kb-article-prose a {
    color: #1570EF;
    text-decoration: none;
}
.kb-article-prose a:hover {
    text-decoration: underline;
}

/* KB Rating Widget */
.kb-rating {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}
.kb-rating-label {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}
.kb-rating-buttons {
    display: flex;
    gap: 8px;
}
.kb-rating-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: all 0.15s;
}
.kb-rating-btn:hover:not(.voted):not(.disabled) {
    border-color: #1570EF;
    background: #EFF6FF;
}
.kb-rating-btn.down:hover:not(.voted):not(.disabled) {
    border-color: #FECACA;
    background: #FEF2F2;
}
.kb-rating-btn.voted.up {
    background: #EFF6FF;
    border-color: #1570EF;
    color: #1570EF;
}
.kb-rating-btn.voted.down {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #EF4444;
}
.kb-rating-btn.disabled {
    pointer-events: none;
    opacity: 0.7;
}
.kb-rating-thanks {
    font-size: 13px;
    color: #9CA3AF;
    margin-top: 8px;
}
.kb-rating-undo {
    background: none;
    border: none;
    color: #1570EF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    font-family: inherit;
}
.kb-rating-undo:hover {
    text-decoration: underline;
}

/* KB Related Articles */
.kb-related {
    margin-top: 32px;
}
.kb-related-heading {
    font-size: 15px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 12px;
}
.kb-related-link {
    display: block;
    font-size: 15px;
    color: #1570EF;
    text-decoration: none;
    padding: 4px 0;
}
.kb-related-link:hover {
    text-decoration: underline;
}

/* KB Empty State */
.kb-empty {
    text-align: center;
    padding: 48px;
    color: #9CA3AF;
    font-size: 15px;
}

/* ============================================================
   TICKET LIST (Phase 34)
   ============================================================ */

.portal-hero-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    background: #FFFFFF;
    color: #1570EF;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.portal-hero-btn:hover {
    text-decoration: none;
    opacity: 0.95;
}

.ticket-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 16px;
}

.ticket-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    min-height: 44px;
    font-size: 13px;
    font-weight: 400;
    color: #6B7280;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.ticket-tab:hover {
    color: #1570EF;
}

.ticket-tab.active {
    color: #1570EF;
    font-weight: 600;
    border-bottom-color: #1570EF;
}

.ticket-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    color: #6B7280;
    border-radius: 12px;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 600;
    min-width: 24px;
    height: 20px;
}

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticket-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px 24px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
}

.ticket-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transform: translateY(-1px);
    text-decoration: none;
}

.ticket-card-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ticket-card-subject {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.ticket-card-meta {
    font-size: 13px;
    font-weight: 400;
    color: #9CA3AF;
}

.ticket-card-preview {
    font-size: 13px;
    font-weight: 400;
    color: #9CA3AF;
    max-width: 480px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.ticket-card-time {
    font-size: 13px;
    font-weight: 400;
    color: #9CA3AF;
}

/* Status pills */
.ticket-pill {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 12px;
}

.ticket-pill-open { background: #EFF6FF; color: #1570EF; }
.ticket-pill-inprogress { background: #F5F3FF; color: #8B5CF6; }
.ticket-pill-waiting { background: #FEF9C3; color: #92400E; }
.ticket-pill-resolved { background: #ECFDF5; color: #10B981; }
.ticket-pill-closed { background: #F3F4F6; color: #6B7280; }

/* Empty state */
.ticket-empty {
    text-align: center;
    padding: 48px 24px;
}

.ticket-empty h3 {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
}

.ticket-empty p {
    font-size: 15px;
    color: #6B7280;
    margin: 0 0 16px;
}

.ticket-empty a {
    color: #1570EF;
    font-size: 13px;
    font-weight: 600;
}

/* ============================================================
   TICKET DETAIL (Phase 34)
   ============================================================ */

.ticket-breadcrumb {
    font-size: 13px;
    color: #9CA3AF;
    margin-bottom: 16px;
}

.ticket-breadcrumb a {
    color: #9CA3AF;
    text-decoration: none;
}

.ticket-breadcrumb a:hover {
    color: #1570EF;
}

.ticket-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ticket-detail-header h1 {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.ticket-pill {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    white-space: nowrap;
}

.ticket-pill-open {
    background: #EFF6FF;
    color: #1570EF;
}

.ticket-pill-waiting {
    background: #FEF9C3;
    color: #92400E;
}

.ticket-pill-resolved {
    background: #ECFDF5;
    color: #10B981;
}

.ticket-pill-closed {
    background: #F3F4F6;
    color: #6B7280;
}

.ticket-detail-meta {
    font-size: 13px;
    color: #9CA3AF;
    margin-bottom: 24px;
}

.ticket-thread {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
}

.ticket-date-sep {
    text-align: center;
    font-size: 13px;
    color: #9CA3AF;
}

.ticket-date-sep span {
    background: #F9FAFB;
    padding: 4px 12px;
    border-radius: 12px;
}

.ticket-bubble {
    display: flex;
    gap: 12px;
}

.ticket-bubble.customer {
    flex-direction: row-reverse;
}

.ticket-bubble-content {
    max-width: 70%;
}

.ticket-bubble.customer .ticket-bubble-content {
    text-align: right;
}

.ticket-bubble-sender {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.ticket-bubble.customer .ticket-bubble-sender {
    color: #1570EF;
}

.ticket-bubble-time {
    font-size: 13px;
    color: #9CA3AF;
    margin-bottom: 4px;
}

.ticket-bubble-body {
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.ticket-bubble.customer .ticket-bubble-body {
    background: #1570EF;
    color: #FFFFFF;
    border-radius: 12px 12px 2px 12px;
}

.ticket-bubble.admin .ticket-bubble-body {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    color: #111827;
    border-radius: 12px 12px 12px 2px;
}

.ticket-reply-box {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px 24px;
    margin-top: 16px;
    max-width: 800px;
}

.ticket-resolved-notice {
    font-size: 13px;
    color: #92400E;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.ticket-reply-textarea {
    width: 100%;
    min-height: 120px;
    max-height: 240px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    resize: vertical;
    outline: none;
}

.ticket-reply-textarea:focus {
    border-color: #1570EF;
    box-shadow: 0 0 0 3px rgba(21,112,239,0.15);
}

.ticket-reply-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.ticket-char-count {
    font-size: 13px;
    color: #9CA3AF;
}

.ticket-char-count.over-limit {
    color: #EF4444;
}

.portal-btn-primary {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    background: #1570EF;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.portal-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ticket-closed-notice {
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px 24px;
    margin-top: 16px;
    max-width: 800px;
    font-size: 13px;
    color: #6B7280;
}

.ticket-closed-notice a {
    color: #1570EF;
    font-weight: 600;
}

.ticket-reply-error {
    font-size: 13px;
    color: #EF4444;
    margin-top: 8px;
}

/* ============================================================
   NEW TICKET FORM (Phase 34)
   ============================================================ */

.ticket-form-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 32px;
    max-width: 640px;
    margin: 0 auto;
}

.ticket-field {
    margin-bottom: 16px;
}

.ticket-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.ticket-field input,
.ticket-field select,
.ticket-field textarea {
    width: 100%;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 15px;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    outline: none;
}

.ticket-field input,
.ticket-field select {
    height: 40px;
}

.ticket-field textarea {
    min-height: 160px;
    padding: 12px;
    resize: vertical;
}

.ticket-field input:focus,
.ticket-field select:focus,
.ticket-field textarea:focus {
    border-color: #1570EF;
    box-shadow: 0 0 0 3px rgba(21,112,239,0.15);
}

.ticket-field input[disabled] {
    background: #F9FAFB;
    cursor: default;
    color: #6B7280;
}

.ticket-field-caption {
    font-size: 13px;
    color: #9CA3AF;
    margin-top: 4px;
}

.ticket-field .validation-message {
    font-size: 13px;
    color: #EF4444;
    margin-top: 4px;
}

.ticket-form-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.ticket-form-cancel {
    font-size: 13px;
    color: #9CA3AF;
    text-decoration: none;
}

.ticket-form-cancel:hover {
    color: #6B7280;
    text-decoration: none;
}

.ticket-submit-error {
    font-size: 13px;
    color: #EF4444;
    margin-top: 8px;
    text-align: center;
}

/* ============================================================
   TICKET ATTACHMENTS (Phase 34)
   ============================================================ */

.ticket-attach-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
}

.ticket-attach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #FFFFFF;
    cursor: pointer;
    color: #6B7280;
    font-size: 18px;
}

.ticket-attach-btn:hover {
    border-color: #1570EF;
    color: #1570EF;
}

.ticket-attach-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ticket-attach-hint {
    font-size: 13px;
    color: #9CA3AF;
}

.ticket-preview-strip {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    flex-wrap: wrap;
}

.ticket-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.ticket-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ticket-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #FFFFFF;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    line-height: 1;
}

.ticket-preview-remove:hover {
    background: rgba(0,0,0,0.8);
}

.ticket-preview-name {
    font-size: 11px;
    color: #9CA3AF;
    text-align: center;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80px;
}

.ticket-attach-error {
    font-size: 13px;
    color: #EF4444;
    padding-top: 4px;
}

/* Drop zone active state */
.drop-zone-active {
    border-color: #1570EF !important;
    border-style: dashed !important;
    background: #EFF6FF !important;
}

/* Inline images in chat bubbles */
.ticket-bubble-images {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
}

.ticket-bubble-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ticket-bubble-img:hover {
    opacity: 0.85;
}

.ticket-bubble.customer .ticket-bubble-img {
    border: 1px solid rgba(255,255,255,0.3);
}

.ticket-bubble.admin .ticket-bubble-img {
    border: 1px solid #E5E7EB;
}

/* ============================================================
   Developer Docs
   ============================================================ */

.dev-docs-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.dev-docs-toc {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 72px;
}

.dev-docs-toc-heading {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6B7280;
    margin-bottom: 12px;
}

.dev-docs-toc a {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #374151;
    text-decoration: none;
    padding: 4px 0 4px 8px;
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
}

.dev-docs-toc a:hover {
    color: #1570EF;
}

.dev-docs-toc a.active {
    font-weight: 600;
    color: #1570EF;
    border-left-color: #1570EF;
}

.dev-docs-content {
    flex: 1;
    max-width: 780px;
    min-width: 0;
}

.dev-endpoint-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.dev-endpoint-card code {
    font-size: 14px;
    font-weight: 600;
}

.dev-method-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
}

.dev-method-get {
    background: #ECFDF5;
    color: #059669;
}

.dev-method-post {
    background: #EFF6FF;
    color: #1570EF;
}

.dev-code-block {
    position: relative;
    background: #111827;
    color: #F9FAFB;
    font-size: 13px;
    font-family: monospace;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 12px 0;
}

.dev-code-block .dev-code-lang {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 11px;
    text-transform: uppercase;
    color: #9CA3AF;
}

.dev-code-block .dev-code-copy {
    position: absolute;
    top: 8px;
    right: 60px;
    font-size: 13px;
    font-weight: 600;
    color: #1570EF;
    background: none;
    border: none;
    cursor: pointer;
    display: none;
}

.dev-code-block:hover .dev-code-copy {
    display: block;
}

@media (max-width: 768px) {
    .dev-docs-toc {
        display: none;
    }
    .dev-docs-layout {
        gap: 0;
    }
}
