/* ==========================================================================
   Client Portal Styles — Websitehelper.nl
   ========================================================================== */

/* ==========================================================================
   Navigation
   ========================================================================== */

.whc-portal-nav {
    background: #fff;
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 0;
    z-index: 100;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.whc-portal-nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 32px;
}

.whc-portal-nav__brand {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    flex-shrink: 0;
}

.whc-portal-nav__brand span {
    color: #1E40AF;
}

.whc-portal-nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.whc-portal-nav__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.whc-portal-nav__link:hover {
    color: #111827;
    background: #F3F4F6;
}

.whc-portal-nav__link--active {
    color: #1E40AF;
    background: #EFF6FF;
}

.whc-portal-nav__icon {
    display: flex;
    align-items: center;
}

.whc-portal-nav__icon svg {
    width: 18px;
    height: 18px;
}

/* User Menu */
.whc-portal-nav__user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.whc-portal-nav__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1E40AF;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.whc-portal-nav__username {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.whc-portal-nav__logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 13px;
    color: #6B7280;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.whc-portal-nav__logout:hover {
    color: #DC2626;
    background: #FEF2F2;
}

.whc-portal-nav__logout svg {
    width: 16px;
    height: 16px;
}

/* Mobile Toggle */
.whc-portal-nav__toggle {
    display: none;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #374151;
    margin-left: auto;
}

/* Mobile Menu */
.whc-portal-nav__mobile {
    display: none;
    flex-direction: column;
    padding: 8px 16px 16px;
    border-top: 1px solid #E5E7EB;
    background: #fff;
}

.whc-portal-nav__mobile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.whc-portal-nav__mobile-link:hover,
.whc-portal-nav__mobile-link--active {
    background: #EFF6FF;
    color: #1E40AF;
}

.whc-portal-nav__mobile-link--logout {
    color: #DC2626;
    margin-top: 8px;
    border-top: 1px solid #E5E7EB;
    padding-top: 16px;
    border-radius: 0 0 8px 8px;
}

.whc-portal-nav__mobile-link--logout:hover {
    background: #FEF2F2;
    color: #DC2626;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.whc-portal-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 60px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: calc(100vh - 64px);
}

.whc-portal-container {
    width: 100%;
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.whc-portal-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 16px;
}

.whc-portal-page-header__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.whc-portal-page-header__subtitle {
    font-size: 14px;
    color: #6B7280;
    margin-top: 4px;
}

.whc-portal-page-header__right {
    flex-shrink: 0;
}

/* Back Link */
.whc-portal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6B7280;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.whc-portal-back:hover {
    color: #1E40AF;
}

.whc-portal-back svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Welcome Section (Dashboard)
   ========================================================================== */

.whc-portal-welcome {
    margin-bottom: 28px;
}

.whc-portal-welcome__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.whc-portal-welcome__subtitle {
    font-size: 15px;
    color: #6B7280;
    margin-top: 6px;
}

/* ==========================================================================
   Stats Row
   ========================================================================== */

.whc-portal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.whc-portal-stats__card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 20px;
}

.whc-portal-stats__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.whc-portal-stats__icon svg {
    width: 22px;
    height: 22px;
}

.whc-portal-stats__icon--tickets {
    background: #DBEAFE;
    color: #1E40AF;
}

.whc-portal-stats__icon--subscription {
    background: #D1FAE5;
    color: #065F46;
}

.whc-portal-stats__icon--invoices {
    background: #FEF3C7;
    color: #92400E;
}

.whc-portal-stats__content {
    min-width: 0;
}

.whc-portal-stats__value {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.whc-portal-stats__label {
    font-size: 13px;
    color: #6B7280;
    margin-top: 2px;
}

/* ==========================================================================
   Grid System
   ========================================================================== */

.whc-portal-grid {
    display: grid;
    gap: 20px;
}

.whc-portal-grid--2 {
    grid-template-columns: 1fr 1fr;
}

.whc-portal-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.whc-portal-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.whc-portal-grid .whc-portal-card {
    margin-bottom: 0;
}

.whc-portal-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #F3F4F6;
}

.whc-portal-card__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.whc-portal-card__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #1E40AF;
    text-decoration: none;
    transition: color 0.2s;
}

.whc-portal-card__link:hover {
    color: #1E3A8A;
}

.whc-portal-card__body {
    padding: 24px;
}

/* ==========================================================================
   Ticket List (Dashboard compact list)
   ========================================================================== */

.whc-portal-ticket-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.whc-portal-ticket-list__item {
    border-bottom: 1px solid #F3F4F6;
}

.whc-portal-ticket-list__item:last-child {
    border-bottom: none;
}

.whc-portal-ticket-list__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    gap: 12px;
}

.whc-portal-ticket-list__link:hover {
    background: transparent;
}

.whc-portal-ticket-list__info {
    min-width: 0;
    flex: 1;
}

.whc-portal-ticket-list__title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.whc-portal-ticket-list__link:hover .whc-portal-ticket-list__title {
    color: #1E40AF;
}

.whc-portal-ticket-list__date {
    display: block;
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 2px;
}

/* ==========================================================================
   Quick Actions
   ========================================================================== */

.whc-portal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.whc-portal-table-wrap {
    overflow-x: auto;
}

.whc-portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.whc-portal-table th {
    text-align: left;
    padding: 12px 20px;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    font-weight: 600;
    font-size: 12px;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.whc-portal-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #F3F4F6;
    color: #374151;
    vertical-align: middle;
}

.whc-portal-table tr:last-child td {
    border-bottom: none;
}

.whc-portal-table tr:hover td {
    background: #F9FAFB;
}

.whc-portal-table__title-link {
    color: #111827;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.whc-portal-table__title-link:hover {
    color: #1E40AF;
}

.whc-portal-table__date {
    color: #6B7280;
    white-space: nowrap;
}

.whc-portal-table__amount {
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}

.whc-portal-table__invoice-number {
    font-weight: 600;
    color: #111827;
}

.whc-portal-table__actions {
    text-align: right;
    white-space: nowrap;
}

.whc-portal-table__paid-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #065F46;
}

.whc-portal-table__muted {
    color: #D1D5DB;
}

/* ==========================================================================
   Card List (mobile view for tables)
   ========================================================================== */

.whc-portal-card-list {
    display: none;
}

.whc-portal-card-list__item {
    display: block;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}

.whc-portal-card-list__item:hover {
    border-color: #1E40AF;
}

.whc-portal-card-list__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.whc-portal-card-list__title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    flex: 1;
    min-width: 0;
}

.whc-portal-card-list__date {
    font-size: 13px;
    color: #6B7280;
}

.whc-portal-card-list__details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 8px;
}

.whc-portal-card-list__amount {
    font-weight: 600;
    color: #111827;
}

.whc-portal-card-list__action {
    margin-top: 10px;
}

/* ==========================================================================
   Badges
   ========================================================================== */

.whc-portal-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
}

.whc-portal-badge--lg {
    padding: 5px 14px;
    font-size: 13px;
}

.whc-portal-badge--small {
    padding: 2px 8px;
    font-size: 11px;
}

/* Ticket status badges */
.whc-portal-badge--new {
    background: #DBEAFE;
    color: #1E40AF;
}

.whc-portal-badge--in_progress {
    background: #FEF3C7;
    color: #92400E;
}

.whc-portal-badge--waiting {
    background: #F3F4F6;
    color: #374151;
}

.whc-portal-badge--resolved {
    background: #D1FAE5;
    color: #065F46;
}

/* Invoice status badges */
.whc-portal-badge--draft {
    background: #F3F4F6;
    color: #374151;
}

.whc-portal-badge--sent {
    background: #DBEAFE;
    color: #1E40AF;
}

.whc-portal-badge--paid {
    background: #D1FAE5;
    color: #065F46;
}

.whc-portal-badge--overdue {
    background: #FEE2E2;
    color: #991B1B;
}

/* Role badge */
.whc-portal-badge--admin {
    background: #EFF6FF;
    color: #1E40AF;
    font-size: 11px;
    vertical-align: middle;
    margin-left: 6px;
}

/* ==========================================================================
   Ticket Header (Detail page)
   ========================================================================== */

.whc-portal-ticket-header {
    margin-bottom: 24px;
}

.whc-portal-ticket-header__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.whc-portal-ticket-header__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.whc-portal-ticket-header__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #6B7280;
    flex-wrap: wrap;
}

.whc-portal-ticket-header__date,
.whc-portal-ticket-header__time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.whc-portal-ticket-header__date svg,
.whc-portal-ticket-header__time svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Ticket Description */
.whc-portal-ticket-description {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

.whc-portal-ticket-description p {
    margin-bottom: 12px;
}

.whc-portal-ticket-description p:last-child {
    margin-bottom: 0;
}

/* Ticket Meta (website URL etc) */
.whc-portal-ticket-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #F3F4F6;
}

.whc-portal-ticket-meta__label {
    color: #6B7280;
    font-weight: 500;
}

.whc-portal-ticket-meta__value {
    color: #1E40AF;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.whc-portal-ticket-meta__value:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Timeline
   ========================================================================== */

.whc-portal-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.whc-portal-timeline__item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #F3F4F6;
}

.whc-portal-timeline__item:last-child {
    border-bottom: none;
}

.whc-portal-timeline__marker {
    flex-shrink: 0;
    padding-top: 2px;
}

.whc-portal-timeline__dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whc-portal-timeline__dot svg {
    width: 14px;
    height: 14px;
}

.whc-portal-timeline__dot--admin {
    background: #DBEAFE;
    color: #1E40AF;
}

.whc-portal-timeline__dot--client {
    background: #F3F4F6;
    color: #374151;
}

.whc-portal-timeline__dot--activity {
    background: #FEF3C7;
    color: #92400E;
}

.whc-portal-timeline__dot--credential {
    background: #D1FAE5;
    color: #065F46;
}

.whc-portal-timeline__item--credential .whc-portal-timeline__body {
    font-style: italic;
    color: #065F46;
}

.whc-portal-timeline__content {
    flex: 1;
    min-width: 0;
}

.whc-portal-timeline__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.whc-portal-timeline__author {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.whc-portal-timeline__time {
    font-size: 12px;
    font-weight: 500;
    color: #92400E;
    background: #FEF3C7;
    padding: 2px 8px;
    border-radius: 9999px;
}

.whc-portal-timeline__date {
    font-size: 12px;
    color: #9CA3AF;
}

.whc-portal-timeline__body {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

.whc-portal-timeline__body p {
    margin-bottom: 8px;
}

.whc-portal-timeline__body p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Reply Form
   ========================================================================== */

.whc-portal-reply-form__error {
    background: #FEF2F2;
    color: #991B1B;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    border: 1px solid #FECACA;
}

.whc-portal-reply-form__success {
    background: #F0FDF4;
    color: #065F46;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    border: 1px solid #A7F3D0;
}

.whc-portal-reply-form__actions {
    margin-top: 12px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.whc-portal-form-group {
    margin-bottom: 20px;
}

.whc-portal-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.whc-portal-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: #F9FAFB;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    color: #111827;
}

.whc-portal-input:focus {
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    background: #fff;
}

.whc-portal-input::placeholder {
    color: #9CA3AF;
}

.whc-portal-input--readonly {
    background: #F3F4F6;
    color: #6B7280;
    cursor: not-allowed;
}

.whc-portal-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: #F9FAFB;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    color: #111827;
}

.whc-portal-textarea:focus {
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    background: #fff;
}

.whc-portal-textarea::placeholder {
    color: #9CA3AF;
}

.whc-portal-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: #F9FAFB;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    color: #111827;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.whc-portal-select:focus {
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    background-color: #fff;
}

/* Radio Grid */
.whc-portal-radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.whc-portal-radio-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #F9FAFB;
}

.whc-portal-radio-card:hover {
    border-color: #93C5FD;
    background: #EFF6FF;
}

.whc-portal-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.whc-portal-radio-card__label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.whc-portal-radio-card--selected {
    border-color: #1E40AF;
    background: #EFF6FF;
    box-shadow: 0 0 0 1px #1E40AF;
}

.whc-portal-radio-card--selected .whc-portal-radio-card__label {
    color: #1E40AF;
    font-weight: 600;
}

/* Form Sections */
.whc-portal-form-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #F3F4F6;
}

.whc-portal-form-section:last-of-type {
    border-bottom: none;
}

.whc-portal-form-section__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px;
}

/* Form Grid */
.whc-portal-form-grid {
    display: grid;
    gap: 16px;
}

.whc-portal-form-grid--2 {
    grid-template-columns: 1fr 1fr;
}

/* Form Helpers */
.whc-portal-form-hint {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 4px;
}

.whc-portal-form-error {
    background: #FEF2F2;
    color: #991B1B;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid #FECACA;
}

.whc-portal-form-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.whc-portal-form-message--success {
    background: #F0FDF4;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.whc-portal-form-message--error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.whc-portal-form-actions {
    margin-top: 16px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.whc-portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    line-height: 1.4;
}

.whc-portal-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.whc-portal-btn--primary {
    background: #1E40AF;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.whc-portal-btn--primary:hover {
    background: #1E3A8A;
    color: #fff;
}

.whc-portal-btn--secondary {
    background: #F3F4F6;
    color: #374151;
}

.whc-portal-btn--secondary:hover {
    background: #E5E7EB;
    color: #111827;
}

.whc-portal-btn--small {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
}

.whc-portal-btn--full {
    width: 100%;
}

.whc-portal-btn--loading {
    opacity: 0.7;
    cursor: wait;
}

.whc-portal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Empty States
   ========================================================================== */

.whc-portal-empty {
    text-align: center;
    padding: 16px 0;
    color: #6B7280;
    font-size: 14px;
}

.whc-portal-empty--large {
    padding: 48px 24px;
}

.whc-portal-empty__icon {
    margin: 0 auto 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
}

.whc-portal-empty__icon svg {
    width: 28px;
    height: 28px;
}

.whc-portal-empty__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 6px;
}

.whc-portal-empty__text {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 20px;
}

/* ==========================================================================
   Success State
   ========================================================================== */

.whc-portal-success {
    text-align: center;
    padding: 32px 24px;
}

.whc-portal-success__icon {
    margin: 0 auto 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #D1FAE5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #065F46;
}

.whc-portal-success__icon svg {
    width: 28px;
    height: 28px;
}

.whc-portal-success__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.whc-portal-success__text {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 24px;
}

.whc-portal-success__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Credential Status (ticket detail)
   ========================================================================== */

.whc-portal-credential-status__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #F3F4F6;
    font-size: 14px;
}

.whc-portal-credential-status__item:last-child {
    border-bottom: none;
}

.whc-portal-credential-status__label {
    font-weight: 600;
    color: #111827;
    flex: 1;
    min-width: 0;
}

.whc-portal-credential-status__date {
    font-size: 12px;
    color: #9CA3AF;
    white-space: nowrap;
}

/* ==========================================================================
   Notices
   ========================================================================== */

.whc-portal-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.whc-portal-notice svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.whc-portal-notice p {
    margin: 0;
}

.whc-portal-notice p + p {
    margin-top: 4px;
}

.whc-portal-notice--info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #DBEAFE;
}

.whc-portal-notice--success {
    background: #F0FDF4;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

/* ==========================================================================
   SLA Dashboard Cards
   ========================================================================== */

.whc-portal-sla-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 24px;
}

.whc-portal-sla-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.whc-portal-sla-card__icon {
    width: 42px;
    height: 42px;
    background: #EFF6FF;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1E40AF;
}

.whc-portal-sla-card__icon svg {
    width: 22px;
    height: 22px;
}

.whc-portal-sla-card__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}

.whc-portal-sla-card__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.whc-portal-sla-card__status--green .whc-portal-sla-card__dot {
    background: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.whc-portal-sla-card__status--yellow .whc-portal-sla-card__dot {
    background: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.whc-portal-sla-card__status--red .whc-portal-sla-card__dot {
    background: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.whc-portal-sla-card__status--gray .whc-portal-sla-card__dot {
    background: #D1D5DB;
    box-shadow: 0 0 0 3px rgba(209, 213, 219, 0.3);
}

.whc-portal-sla-card__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
}

.whc-portal-sla-card__desc {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 14px;
}

.whc-portal-sla-card__summary {
    font-size: 13px;
    color: #374151;
    padding: 10px 12px;
    background: #F9FAFB;
    border-radius: 6px;
    margin-bottom: 14px;
}

.whc-portal-sla-card__footer {
    padding-top: 12px;
    border-top: 1px solid #F3F4F6;
}

.whc-portal-sla-card__date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #6B7280;
}

.whc-portal-sla-card__date svg {
    width: 12px;
    height: 12px;
}

.whc-portal-sla-card__date--none {
    color: #9CA3AF;
    font-style: italic;
}

/* ==========================================================================
   Account / Subscription
   ========================================================================== */

.whc-portal-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.whc-portal-settings-grid .whc-portal-card {
    margin-bottom: 0;
}

.whc-portal-subscription {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.whc-portal-subscription__current {
    padding: 16px;
    background: #F9FAFB;
    border-radius: 8px;
}

.whc-portal-subscription__label {
    font-size: 12px;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 4px;
}

.whc-portal-subscription__value {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.whc-portal-subscription__upgrade {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.whc-portal-subscription__text {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.5;
    margin: 0;
}

.whc-portal-subscription__managed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================================================
   Login/Register Auth Page
   ========================================================================== */

.whc-portal-auth {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 40px 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #EFF6FF 0%, #F9FAFB 100%);
}

.whc-portal-auth__container {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.whc-portal-auth__brand {
    text-align: center;
    padding: 32px 32px 24px;
}

.whc-portal-auth__logo {
    font-family: 'DM Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
}

.whc-portal-auth__logo span {
    color: #1E40AF;
}

.whc-portal-auth__tagline {
    font-size: 14px;
    color: #6B7280;
    margin-top: 4px;
}

.whc-portal-auth__tabs {
    display: flex;
    border-bottom: 1px solid #E5E7EB;
    margin: 0 32px;
}

.whc-portal-auth__tab {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.whc-portal-auth__tab:hover {
    color: #374151;
}

.whc-portal-auth__tab--active {
    color: #1E40AF;
    border-bottom-color: #1E40AF;
}

.whc-portal-auth__panel {
    padding: 24px 32px 32px;
}

.whc-portal-auth__error {
    background: #FEF2F2;
    color: #991B1B;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid #FECACA;
}

.whc-portal-auth__footer {
    margin-top: 16px;
    text-align: center;
}

.whc-portal-auth__link {
    font-size: 13px;
    color: #1E40AF;
    text-decoration: none;
}

.whc-portal-auth__link:hover {
    text-decoration: underline;
}

.whc-portal-auth__note {
    font-size: 12px;
    color: #6B7280;
    line-height: 1.5;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .whc-portal-nav__links {
        display: none;
    }

    .whc-portal-nav__user {
        display: none;
    }

    .whc-portal-nav__toggle {
        display: block;
    }

    .whc-portal-nav__mobile--open {
        display: flex;
    }

    .whc-portal-grid--2,
    .whc-portal-grid--3 {
        grid-template-columns: 1fr;
    }

    .whc-portal-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .whc-portal-layout {
        padding: 20px 16px 40px;
    }

    .whc-portal-page-header {
        flex-direction: column;
        gap: 12px;
    }

    .whc-portal-page-header__title {
        font-size: 24px;
    }

    .whc-portal-welcome__title {
        font-size: 24px;
    }

    .whc-portal-stats {
        grid-template-columns: 1fr;
    }

    /* Switch from table to card list on mobile */
    .whc-portal-table-wrap {
        display: none;
    }

    .whc-portal-card-list {
        display: block;
    }

    .whc-portal-ticket-header__top {
        flex-direction: column;
        gap: 8px;
    }

    .whc-portal-form-grid--2 {
        grid-template-columns: 1fr;
    }

    .whc-portal-radio-grid {
        grid-template-columns: 1fr 1fr;
    }

    .whc-portal-success__actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .whc-portal-auth {
        padding: 20px 16px;
    }

    .whc-portal-auth__brand {
        padding: 24px 20px 16px;
    }

    .whc-portal-auth__tabs {
        margin: 0 20px;
    }

    .whc-portal-auth__panel {
        padding: 20px;
    }

    .whc-portal-card__header {
        padding: 14px 16px;
    }

    .whc-portal-card__body {
        padding: 16px;
    }

    .whc-portal-radio-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Terms Checkbox
   ========================================================================== */

.whc-portal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.whc-portal-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.whc-portal-checkbox__mark {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    margin-top: 2px;
    transition: all 0.15s ease;
    position: relative;
}

.whc-portal-checkbox input[type="checkbox"]:checked + .whc-portal-checkbox__mark {
    background-color: #1E40AF;
    border-color: #1E40AF;
}

.whc-portal-checkbox input[type="checkbox"]:checked + .whc-portal-checkbox__mark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.whc-portal-checkbox input[type="checkbox"]:focus-visible + .whc-portal-checkbox__mark {
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

.whc-portal-checkbox__label {
    color: #6B7280;
}

.whc-portal-checkbox__label a {
    color: #1E40AF;
    text-decoration: underline;
}

.whc-portal-checkbox__label a:hover {
    color: #1E3A8A;
}

/* ==========================================================================
   Language Block Visibility (legal pages)
   ========================================================================== */

.wh-legal-articles [lang="en"],
.wh-legal-contact [lang="en"] {
    display: none;
}
