/* PORTAL CLIENT PAGES - Extracted from pages.css */
/* ChangePassword PAGE */
    .back-link {
        display: inline-block;
        color: var(--c-text-muted);
        text-decoration: none;
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .back-link:hover {
        color: var(--accent);
    }
    
    .form-card {
        max-width: 500px;
        padding: 24px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        display: block;
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 8px;
        color: var(--c-text-primary);
    }
    
    .required {
        color: var(--c-danger);
    }
    
    .form-group input {
        width: 100%;
        padding: 12px;
        border: 1px solid var(--c-border);
        border-radius: 8px;
        font-size: 14px;
        background: var(--c-bg-secondary);
        color: var(--c-text-primary);
        box-sizing: border-box;
    }
    
    .form-group input:focus {
        outline: none;
        border-color: var(--accent);
    }
    
    .password-requirements {
        background: var(--bg-secondary);
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .password-requirements p {
        margin: 0 0 10px;
        font-size: 13px;
        color: var(--c-text-muted);
    }
    
    .password-requirements ul {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-wrap: wrap;
        gap: 8px 16px;
    }
    
    .password-requirements li {
        font-size: 12px;
        color: var(--c-text-muted);
    }
    
    .password-requirements li.valid {
        color: var(--c-success);
    }
    
    .form-actions {
        display: flex;
        gap: 12px;
        justify-content: flex-end;
        padding-top: 16px;
        border-top: 1px solid var(--c-border);
    }
    
    .btn-secondary {
        background: var(--bg-secondary);
        color: var(--c-text-primary);
    }
    
    .btn-secondary:hover {
        background: var(--c-border);
    }
    
    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
    
    .alert {
        padding: 14px 16px;
        border-radius: 8px;
        margin-bottom: 20px;
        font-size: 14px;
    }
    
    .alert-success {
        background: var(--c-success-bg);
        color: #166534;
    }
    
    .alert-error {
        background: var(--c-danger-bg);
        color: var(--c-danger-dark);
    }
    
    @media (max-width: 640px) {
        .form-actions {
            flex-direction: column-reverse;
        }
        
        .form-actions .btn {
            width: 100%;
            justify-content: center;
        }
    }

/* Dashboard PAGE */
    .dashboard-loading {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 400px;
        gap: 16px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        border: 3px solid var(--c-border);
        border-top-color: var(--c-primary);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }
    
    
    .page-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 24px;
        flex-wrap: wrap;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--c-text-primary);
        margin: 0 0 4px;
    }
    
    .subtitle {
        color: var(--c-text-secondary);
        margin: 0;
        text-transform: capitalize;
    }
    
    .btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 18px;
        border-radius: 8px;
        font-size: 0.875rem;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.15s;
        cursor: pointer;
        border: none;
    }
    
    .btn-primary {
        background: var(--c-primary);
        color: var(--c-primary);
    }
    
    .btn-primary:hover {
        filter: brightness(1.1);
    }
    
    .btn-outline {
        background: transparent;
        border: 1px solid var(--c-border);
        color: var(--c-text-primary);
    }
    
    .btn-outline:hover {
        border-color: var(--c-primary);
        color: var(--c-primary);
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.8125rem;
    }
    
    /* Stats */
    .stats-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .stat-box {
        background: var(--c-bg-primary);
        border: 1px solid var(--c-border);
        border-radius: 12px;
        padding: 20px;
        text-align: center;
    }
    
    .stat-box.stat-gold {
        background: rgba(201, 162, 39, 0.08);
        border-color: var(--c-primary);
    }
    
    .stat-value {
        display: block;
        font-size: 2rem;
        font-weight: 700;
        color: var(--c-text-primary);
        line-height: 1.2;
    }
    
    .stat-label {
        font-size: 0.8125rem;
        color: var(--c-text-secondary);
    }
    
    /* Grid */
    .dashboard-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
        gap: 20px;
        margin-bottom: 24px;
    }
    
    .card {
        background: var(--c-bg-primary);
        border: 1px solid var(--c-border);
        border-radius: 12px;
        overflow: hidden;
    }
    
    .card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid var(--c-border);
    }
    
    .card-header h3 {
        font-size: 0.9375rem;
        font-weight: 600;
        color: var(--c-text-primary);
        margin: 0;
    }
    
    .card-link {
        font-size: 0.8125rem;
        color: var(--c-primary);
        text-decoration: none;
    }
    
    .card-link:hover { text-decoration: underline; }
    
    .card-content {
        padding: 16px 20px;
    }
    
    /* Empty State */
    .empty-state {
        text-align: center;
        padding: 24px;
        color: var(--c-text-secondary);
    }
    
    .empty-state p { margin: 0 0 8px; }
    .empty-state .hint { font-size: 0.8125rem; color: var(--c-text-muted); }
    
    /* Ticket List */
    .ticket-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .ticket-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px;
        background: var(--c-bg-secondary);
        border-radius: 8px;
        text-decoration: none;
        transition: all 0.15s;
    }
    
    .ticket-item:hover {
        background: var(--c-bg-hover);
    }
    
    .ticket-item.unread {
        background: rgba(201, 162, 39, 0.05);
        border-left: 3px solid var(--c-primary);
    }
    
    .ticket-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
    }
    
    .ticket-title {
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--c-text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .ticket-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.75rem;
        color: var(--c-text-muted);
    }
    
    .status-badge {
        padding: 2px 8px;
        border-radius: 4px;
        color: white;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .unread-dot {
        width: 8px;
        height: 8px;
        background: var(--c-primary);
        border-radius: 50%;
        flex-shrink: 0;
    }
    
    /* Report Preview */
    .report-preview {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .report-period {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--c-text-primary);
        text-transform: capitalize;
    }
    
    .report-template {
        font-size: 0.8125rem;
        color: var(--c-text-muted);
    }
    
    .report-notes {
        font-size: 0.8125rem;
        color: var(--c-text-secondary);
        margin: 0;
        padding: 10px;
        background: var(--c-bg-secondary);
        border-radius: 8px;
    }
    
    /* Quick Actions */
    .quick-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .action-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 20px;
        background: var(--c-bg-secondary);
        border: 1px solid var(--c-border);
        border-radius: 12px;
        text-decoration: none;
        transition: all 0.15s;
    }
    
    .action-card:hover {
        border-color: var(--c-primary);
        transform: translateY(-2px);
    }
    
    .action-icon {
        font-size: 1.5rem;
    }
    
    .action-text {
        font-size: 0.8125rem;
        font-weight: 500;
        color: var(--c-text-primary);
    }
    
    @media (max-width: 640px) {
        .page-header { flex-direction: column; align-items: stretch; }
        .dashboard-grid { grid-template-columns: 1fr; }
    }

/* Documents PAGE */
    .documents-page { max-width: 800px; }
    .page-header { margin-bottom: 24px; }
    .page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--c-text-primary); margin: 0 0 4px; }
    .page-header p { color: var(--c-text-secondary); margin: 0; font-size: 0.875rem; }
    
    .section { background: var(--c-bg-primary); border: 1px solid var(--c-border); border-radius: 16px; padding: 24px; margin-bottom: 24px; }
    .section h2 { font-size: 1.125rem; font-weight: 600; color: var(--c-text-primary); margin: 0 0 16px; }
    
    .loading { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 40px; color: var(--c-text-secondary); }
    .spinner { width: 20px; height: 20px; border: 2px solid var(--c-border); border-top-color: var(--c-primary); border-radius: 50%; animation: documentspin 1s linear infinite; }
    
    .documents-list { display: flex; flex-direction: column; gap: 12px; }
    
    .document-item { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--c-bg-secondary); border-radius: 12px; border: 1px solid var(--c-border); }
    .document-icon { font-size: 1.5rem; }
    .document-info { flex: 1; }
    .document-title { font-weight: 600; color: var(--c-text-primary); margin-bottom: 4px; }
    .document-meta { display: flex; align-items: center; gap: 12px; font-size: 0.8125rem; }
    .validity { color: var(--c-text-secondary); }
    
    .status { padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 500; }
    .status-gray { background: rgba(128,128,128,0.1); color: #666; }
    .status-blue { background: rgba(59,130,246,0.1); color: var(--c-info); }
    .status-yellow { background: rgba(234,179,8,0.1); color: var(--c-primary-dark); }
    .status-green { background: rgba(34,197,94,0.1); color: var(--c-success-hover); }
    .status-red { background: rgba(239,68,68,0.1); color: var(--c-danger-hover); }
    
    .document-actions { }
    .btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 0.875rem; font-weight: 500; text-decoration: none; transition: all 0.15s; }
    .btn svg { width: 16px; height: 16px; }
    .btn-outline { background: transparent; border: 1px solid var(--c-border); color: var(--c-text-primary); }
    .btn-outline:hover { background: var(--c-bg-secondary); border-color: var(--c-primary); }
    
    .empty-state { text-align: center; padding: 40px; color: var(--c-text-secondary); }
    .empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
    .empty-state p { margin: 0 0 4px; }
    .empty-state small { font-size: 0.8125rem; opacity: 0.7; }
    
    .coming-soon { padding: 24px; background: var(--c-bg-secondary); border-radius: 12px; text-align: center; }
    .coming-soon p { color: var(--c-text-secondary); margin: 0 0 8px; font-size: 0.875rem; }
    .coming-soon a { color: var(--c-primary); }

/* FirstLogin PAGE */
    .portal-login {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--c-bg-primary) 0%, var(--brand-navy) 100%);
        padding: 20px;
    }
    
    .login-card {
        background: var(--c-bg-primary);
        border-radius: 16px;
        padding: 48px;
        width: 100%;
        max-width: 420px;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
    
    .login-header {
        text-align: center;
        margin-bottom: 32px;
    }
    
    .login-header h1 {
        font-size: 28px;
        font-weight: 700;
        color: var(--c-bg-primary);
        margin-bottom: 8px;
    }
    
    .login-header p {
        color: var(--c-text-secondary);
        font-size: 14px;
        margin: 0;
    }
    
    .login-error {
        background: var(--c-danger-bg);
        border: 1px solid var(--c-danger);
        color: var(--c-danger-hover);
        padding: 12px 16px;
        border-radius: 8px;
        margin-bottom: 24px;
        font-size: 14px;
    }
    
    .login-error a {
        color: var(--c-danger-hover);
        font-weight: 500;
    }
    
    .login-success {
        background: var(--c-success-bg);
        border: 1px solid var(--c-success);
        color: var(--c-success-hover);
        padding: 12px 16px;
        border-radius: 8px;
        margin-bottom: 24px;
        font-size: 14px;
    }
    
    .portal-login .form-group {
        margin-bottom: 20px;
    }
    
    .portal-login .form-group label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 500;
        color: var(--c-text-primary);
    }
    
    .required {
        color: var(--c-danger);
    }
    
    .portal-login .form-group input {
        width: 100%;
        padding: 12px 14px;
        border: 1px solid var(--c-border);
        border-radius: 8px;
        font-size: 14px;
        background: var(--c-bg-secondary);
        color: var(--c-text-primary);
        box-sizing: border-box;
    }
    
    .portal-login .form-group input:focus {
        outline: none;
        border-color: var(--c-primary);
        box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
        background: var(--c-bg-primary);
    }
    
    .btn-login {
        width: 100%;
        padding: 14px;
        background: var(--c-primary);
        color: var(--c-bg-primary);
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    
    .btn-login svg {
        width: 20px;
        height: 20px;
    }
    
    .btn-login:hover:not(:disabled) {
        background: #d4b02e;
    }
    
    .btn-login:disabled {
        background: var(--c-border);
        color: var(--c-text-muted);
        cursor: not-allowed;
    }
    
    .password-requirements {
        background: var(--c-bg-tertiary);
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 24px;
    }
    
    .password-requirements p {
        margin: 0 0 10px;
        font-size: 13px;
        font-weight: 600;
        color: var(--c-text-secondary);
    }
    
    .password-requirements ul {
        margin: 0;
        padding: 0;
        list-style: none;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .password-requirements li {
        font-size: 12px;
        color: var(--c-text-muted);
    }
    
    .password-requirements li.valid {
        color: var(--c-success);
    }

/* ForgotPassword PAGE */
    .login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--c-info-dark) 0%, var(--c-info-dark) 100%); padding: 2rem; }
    .login-card { background: white; border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
    .login-header { text-align: center; margin-bottom: 2rem; }
    .logo { width: 60px; height: 60px; background: linear-gradient(135deg, var(--c-info-dark) 0%, var(--c-info) 100%); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
    .logo svg { width: 32px; height: 32px; color: white; }
    .login-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--c-text-primary); margin: 0 0 0.5rem 0; }
    .login-header p { color: var(--c-text-secondary); margin: 0; font-size: 0.95rem; }
    .form-group { margin-bottom: 1.25rem; }
    .form-group label { display: block; font-weight: 500; color: var(--c-text-primary); margin-bottom: 0.5rem; font-size: 0.9rem; }
    .form-control { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--c-border); border-radius: 10px; font-size: 1rem; transition: all 0.15s; box-sizing: border-box; }
    .form-control:focus { outline: none; border-color: var(--c-info-dark); box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1); }
    .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.875rem 1.5rem; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.15s; text-decoration: none; }
    .btn-primary { background: linear-gradient(135deg, var(--c-info-dark) 0%, var(--c-info) 100%); color: white; }
    .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4); }
    .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
    .btn-outline { background: white; border: 1px solid var(--c-border); color: var(--c-text-primary); }
    .btn-full { width: 100%; }
    .login-footer { text-align: center; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--c-border); }
    .login-footer a { color: var(--c-info-dark); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
    .alert { padding: 0.875rem 1rem; border-radius: 10px; margin-bottom: 1.5rem; font-size: 0.9rem; display: flex; align-items: center; gap: 0.75rem; }
    .alert-error { background: var(--c-danger-bg); color: var(--c-danger-hover); border: 1px solid var(--c-danger-light); }
    .alert-success { background: var(--c-success-bg); color: var(--c-success-hover); border: 1px solid var(--c-success-light); }
    .alert svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Login PAGE */
    .portal-login {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
        padding: 20px;
    }
    
    .login-card {
        background: var(--c-bg-primary);
        border-radius: 16px;
        width: 100%;
        max-width: 420px;
        box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
        overflow: hidden;
    }
    
    .login-header {
        padding: 32px 32px 24px;
        text-align: center;
        border-bottom: 1px solid var(--c-border);
    }
    
    .login-logo {
        width: 64px;
        height: 64px;
        object-fit: contain;
        margin-bottom: 16px;
    }
    
    .login-header h1 {
        font-size: 24px;
        font-weight: 700;
        color: var(--brand-navy);
        margin: 0 0 4px;
    }
    
    .login-header p {
        color: var(--c-text-secondary);
        font-size: 14px;
        margin: 0;
    }
    
    .login-error {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 20px;
        background: var(--c-danger-bg);
        color: var(--c-danger-dark);
        font-size: 14px;
        border-bottom: 1px solid var(--c-danger-light);
    }
    
    .login-error svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        margin-top: 1px;
    }
    
    .login-error-locked {
        background: var(--c-warning-bg);
        color: var(--c-warning-dark);
        border-bottom-color: var(--c-warning-light);
    }
    
    .login-error-locked div {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .login-error-locked strong {
        font-weight: 600;
    }
    
    .login-error-locked span {
        font-size: 13px;
        opacity: 0.9;
    }
    
    .login-card form {
        padding: 24px 32px;
    }
    
    .portal-login .form-group {
        margin-bottom: 20px;
    }
    
    .portal-login .form-group label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: var(--c-text-primary);
        margin-bottom: 8px;
    }
    
    .portal-login .form-group input {
        width: 100%;
        padding: 12px 14px;
        border: 2px solid var(--c-border);
        border-radius: 10px;
        font-size: 15px;
        transition: all 0.2s;
        box-sizing: border-box;
    }
    
    .portal-login .form-group input:focus {
        outline: none;
        border-color: var(--c-primary);
        box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
    }
    
    .portal-login .form-group input::placeholder {
        color: var(--c-text-muted);
    }
    
    .btn-login {
        width: 100%;
        padding: 14px 20px;
        background: linear-gradient(135deg, var(--c-primary) 0%, #b8922a 100%);
        color: var(--brand-navy);
        border: none;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .btn-login:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(201,162,39,0.4);
    }
    
    .btn-login:active {
        transform: translateY(0);
    }
    
    .btn-login svg {
        width: 18px;
        height: 18px;
    }
    
    .login-footer {
        padding: 16px 32px;
        background: var(--c-bg-secondary);
        border-top: 1px solid var(--c-border);
        text-align: center;
        font-size: 13px;
    }
    
    .login-footer a {
        color: var(--brand-navy);
        text-decoration: none;
    }
    
    .login-footer a:hover {
        color: var(--c-primary);
    }
    
    .login-footer .separator {
        margin: 0 12px;
        color: var(--c-border-hover);
    }
    
    .login-security-note {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 32px 16px;
        background: var(--c-bg-secondary);
        color: var(--c-text-secondary);
        font-size: 12px;
    }
    
    .login-security-note svg {
        width: 14px;
        height: 14px;
        color: var(--c-success-hover);
    }
    
    @media (max-width: 480px) {
        .login-header,
        .login-card form,
        .login-footer,
        .login-security-note {
            padding-left: 24px;
            padding-right: 24px;
        }
    }

/* NewTicket PAGE */
    .page-header {
        margin-bottom: 24px;
    }
    
    .back-link {
        display: inline-block;
        color: var(--c-text-secondary);
        text-decoration: none;
        font-size: 0.875rem;
        margin-bottom: 12px;
        transition: color 0.15s;
    }
    
    .back-link:hover { color: var(--c-primary); }
    
    .page-header h1 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--c-text-primary);
        margin: 0 0 4px;
    }
    
    .subtitle { color: var(--c-text-secondary); margin: 0; }
    
    .form-card {
        background: var(--c-bg-primary);
        border: 1px solid var(--c-border);
        border-radius: 12px;
        padding: 24px;
        margin-bottom: 20px;
        max-width: 700px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group:last-of-type {
        margin-bottom: 24px;
    }
    
    .form-group label {
        display: block;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--c-text-primary);
        margin-bottom: 8px;
    }
    
    .required { color: var(--c-danger); }
    
    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 12px 14px;
        border: 1px solid var(--c-border);
        border-radius: 8px;
        font-size: 0.9375rem;
        background: var(--c-bg-secondary);
        color: var(--c-text-primary);
        transition: all 0.15s;
        box-sizing: border-box;
        font-family: inherit;
    }
    
    .form-group input:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--c-primary);
        box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
        background: var(--c-bg-primary);
    }
    
    .form-group textarea {
        resize: vertical;
        min-height: 120px;
    }
    
    .char-counter {
        display: block;
        text-align: right;
        font-size: 0.75rem;
        color: var(--c-text-muted);
        margin-top: 4px;
    }
    
    .form-hint {
        display: block;
        font-size: 0.8125rem;
        color: var(--c-text-muted);
        margin-top: 6px;
    }
    
    /* Priority Selector */
    .priority-selector {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .priority-option {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        background: var(--c-bg-secondary);
        border: 1px solid var(--c-border);
        border-radius: 8px;
        font-size: 0.875rem;
        color: var(--c-text-secondary);
        cursor: pointer;
        transition: all 0.15s;
    }
    
    .priority-option:hover {
        border-color: var(--c-text-muted);
    }
    
    .priority-option.active {
        border-color: var(--c-primary);
        background: rgba(201, 162, 39, 0.05);
        color: var(--c-text-primary);
    }
    
    .priority-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }
    
    .priority-dot.low { background: var(--c-text-muted); }
    .priority-dot.normal { background: var(--c-info); }
    .priority-dot.high { background: var(--c-warning); }
    
    /* Form Actions */
    .form-actions {
        display: flex;
        gap: 12px;
        justify-content: flex-end;
        padding-top: 16px;
        border-top: 1px solid var(--c-border);
    }
    
    .btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 20px;
        border-radius: 8px;
        font-size: 0.875rem;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.15s;
        cursor: pointer;
        border: none;
    }
    
    .btn-primary {
        background: var(--c-primary);
        color: var(--c-primary);
    }
    
    .btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
    .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
    
    .btn-secondary {
        background: var(--bg-secondary);
        color: var(--c-text-primary);
    }
    
    .btn-secondary:hover { background: var(--c-border); }
    
    .btn-spinner {
        width: 16px;
        height: 16px;
        border: 2px solid rgba(26, 54, 93, 0.3);
        border-top-color: var(--c-primary);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }
    
    
    /* Alert */
    .alert {
        padding: 14px 16px;
        border-radius: 8px;
        font-size: 0.875rem;
        margin-bottom: 20px;
    }
    
    .alert-error { background: var(--danger-bg); color: var(--c-danger); }
    
    /* Tips */
    .tips-card {
        background: var(--info-bg);
        border: 1px solid rgba(37, 99, 235, 0.2);
        border-radius: 12px;
        padding: 20px;
        max-width: 700px;
    }
    
    .tips-card h3 {
        font-size: 0.9375rem;
        font-weight: 600;
        color: var(--c-info);
        margin: 0 0 12px;
    }
    
    .tips-card ul {
        margin: 0;
        padding-left: 20px;
    }
    
    .tips-card li {
        color: var(--c-info);
        font-size: 0.8125rem;
        margin-bottom: 6px;
        line-height: 1.5;
    }
    
    .tips-card li:last-child { margin-bottom: 0; }
    
    @media (max-width: 640px) {
        .form-actions {
            flex-direction: column-reverse;
        }
        
        .btn { width: 100%; justify-content: center; }
        
        .priority-selector {
            flex-direction: column;
        }
        
        .priority-option { justify-content: center; }
    }

/* Profile PAGE */
    .page-content {
        max-width: 800px;
    }
    
    .page-header {
        margin-bottom: 1.5rem;
    }
    
    .page-header h1 {
        margin: 0 0 0.25rem;
    }
    
    .page-header .subtitle {
        margin: 0;
        color: var(--c-text-secondary);
    }
    
    .profile-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .profile-field {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--c-border);
    }
    
    .profile-field:last-of-type {
        border-bottom: none;
        margin-bottom: 1rem;
    }
    
    .field-label {
        font-size: 0.75rem;
        color: var(--c-text-muted);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .field-value {
        font-size: 1rem;
        color: var(--c-text-primary);
        font-weight: 500;
    }
    
    /* Toggle Settings */
    .notification-settings {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .toggle-setting {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 1rem;
        background: var(--c-bg-secondary);
        border-radius: 8px;
    }
    
    .toggle-setting.disabled {
        opacity: 0.6;
    }
    
    .setting-info {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .setting-label {
        font-weight: 500;
        color: var(--c-text-primary);
    }
    
    .setting-desc {
        font-size: 0.8125rem;
        color: var(--c-text-muted);
    }
    
    .toggle-placeholder {
        color: var(--c-success);
        font-weight: 600;
    }
    
    .small {
        font-size: 0.8125rem;
    }
    
    @media (max-width: 640px) {
        .profile-grid {
            grid-template-columns: 1fr;
        }
    }

/* ReportView PAGE */
    .page-content {
        max-width: 800px;
    }
    
    .loading-state {
        padding: 4rem 2rem;
        text-align: center;
        color: var(--c-text-secondary);
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border: 3px solid var(--c-border);
        border-top-color: var(--c-primary);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin: 0 auto 1rem;
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    
    .empty-state {
        padding: 3rem 2rem;
        text-align: center;
    }
    
    .empty-state h3 {
        margin: 0 0 0.5rem;
        color: var(--c-text-primary);
    }
    
    .empty-state p {
        margin: 0 0 1.5rem;
        color: var(--c-text-secondary);
    }
    
    .back-link {
        display: inline-block;
        color: var(--c-text-secondary);
        text-decoration: none;
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .back-link:hover {
        color: var(--c-primary);
    }
    
    .report-header {
        margin-bottom: 1.5rem;
    }
    
    .report-header h1 {
        margin: 0 0 0.75rem;
        font-size: 1.5rem;
        text-transform: capitalize;
    }
    
    .header-meta {
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .badge {
        padding: 0.25rem 0.75rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    .badge-info {
        background: var(--info-bg);
        color: var(--c-info);
    }
    
    .notes-card {
        margin-bottom: 1.25rem;
    }
    
    .notes-content {
        white-space: pre-wrap;
        line-height: 1.6;
        color: var(--c-text-secondary);
    }
    
    .card {
        margin-bottom: 1.25rem;
    }
    
    .report-fields {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .report-field {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem;
        background: var(--c-bg-secondary);
        border-radius: 8px;
    }
    
    .field-label {
        font-size: 0.75rem;
        color: var(--c-text-muted);
        font-weight: 500;
    }
    
    .field-value {
        font-size: 1rem;
        font-weight: 600;
        color: var(--c-text-primary);
    }
    
    .field-value.money {
        color: var(--c-primary);
    }

/* Reports PAGE */
    .page-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
    }
    
    .page-header h1 { margin: 0 0 0.25rem; }
    .page-header .subtitle { margin: 0; color: var(--c-text-secondary); }
    
    .year-selector {
        display: flex;
        gap: 0.5rem;
    }
    
    .loading-state,
    .empty-state {
        padding: 4rem 2rem;
        text-align: center;
        color: var(--c-text-secondary);
    }
    
    .empty-state svg {
        color: var(--c-text-muted);
        margin-bottom: 1rem;
    }
    
    .empty-state h3 {
        margin: 0 0 0.5rem;
        color: var(--c-text-primary);
    }
    
    .empty-state p {
        margin: 0;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border: 3px solid var(--c-border);
        border-top-color: var(--c-primary);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin: 0 auto 1rem;
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    
    .data-table tbody tr {
        cursor: pointer;
    }
    
    .data-table tbody tr:hover {
        background: var(--c-bg-hover);
    }
    
    .report-period {
        font-weight: 600;
        text-transform: capitalize;
    }
    
    .badge {
        padding: 0.25rem 0.625rem;
        border-radius: 4px;
        font-size: 0.6875rem;
        font-weight: 600;
    }
    
    .badge-info {
        background: var(--info-bg);
        color: var(--c-info);
    }
    
    .view-link {
        color: var(--c-primary);
        font-size: 0.875rem;
    }
    
    @media (max-width: 640px) {
        .page-header {
            flex-direction: column;
        }
    }

/* ResetPassword PAGE */
    .login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--c-info-dark) 0%, var(--c-info-dark) 100%); padding: 2rem; }
    .login-card { background: white; border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
    .login-header { text-align: center; margin-bottom: 2rem; }
    .logo { width: 60px; height: 60px; background: linear-gradient(135deg, var(--c-info-dark) 0%, var(--c-info) 100%); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
    .logo svg { width: 32px; height: 32px; color: white; }
    .login-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--c-text-primary); margin: 0 0 0.5rem 0; }
    .login-header p { color: var(--c-text-secondary); margin: 0; font-size: 0.95rem; }
    .form-group { margin-bottom: 1.25rem; }
    .form-group label { display: block; font-weight: 500; color: var(--c-text-primary); margin-bottom: 0.5rem; font-size: 0.9rem; }
    .form-control { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--c-border); border-radius: 10px; font-size: 1rem; transition: all 0.15s; box-sizing: border-box; }
    .form-control:focus { outline: none; border-color: var(--c-info-dark); box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1); }
    .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.875rem 1.5rem; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.15s; text-decoration: none; }
    .btn-primary { background: linear-gradient(135deg, var(--c-info-dark) 0%, var(--c-info) 100%); color: white; }
    .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4); }
    .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
    .btn-outline { background: white; border: 1px solid var(--c-border); color: var(--c-text-primary); }
    .btn-full { width: 100%; }
    .alert { padding: 0.875rem 1rem; border-radius: 10px; margin-bottom: 1.5rem; font-size: 0.9rem; display: flex; align-items: center; gap: 0.75rem; }
    .alert-error { background: var(--c-danger-bg); color: var(--c-danger-hover); border: 1px solid var(--c-danger-light); }
    .alert-success { background: var(--c-success-bg); color: var(--c-success-hover); border: 1px solid var(--c-success-light); }
    .alert svg { width: 20px; height: 20px; flex-shrink: 0; }

/* TicketView PAGE */
    .page-content {
        max-width: 800px;
    }
    
    .loading-state {
        padding: 4rem 2rem;
        text-align: center;
        color: var(--c-text-secondary);
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border: 3px solid var(--c-border);
        border-top-color: var(--c-primary);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin: 0 auto 1rem;
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    
    .empty-state {
        padding: 3rem 2rem;
        text-align: center;
    }
    
    .empty-state h3 {
        margin: 0 0 0.5rem;
        color: var(--c-text-primary);
    }
    
    .empty-state p {
        margin: 0 0 1.5rem;
        color: var(--c-text-secondary);
    }
    
    /* Header */
    .ticket-header {
        margin-bottom: 1.5rem;
    }
    
    .back-link {
        display: inline-block;
        color: var(--c-text-secondary);
        text-decoration: none;
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .back-link:hover {
        color: var(--c-primary);
    }
    
    .header-content h1 {
        margin: 0 0 0.75rem;
        font-size: 1.5rem;
    }
    
    .header-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
    }
    
    .status-badge {
        padding: 0.25rem 0.75rem;
        border-radius: 4px;
        font-size: 0.6875rem;
        font-weight: 600;
        color: white;
        text-transform: uppercase;
    }
    
    .priority-badge {
        padding: 0.25rem 0.75rem;
        border-radius: 4px;
        font-size: 0.6875rem;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .priority-low { background: var(--bg-secondary); color: var(--c-text-secondary); }
    .priority-normal { background: var(--info-bg); color: var(--c-info); }
    .priority-high { background: var(--warning-bg); color: var(--c-warning); }
    .priority-urgent { background: var(--danger-bg); color: var(--c-danger); }
    
    .meta-item {
        font-size: 0.8125rem;
        color: var(--c-text-muted);
    }
    
    .meta-item.overdue {
        color: var(--c-danger);
    }
    
    /* Description */
    .description-text {
        white-space: pre-wrap;
        line-height: 1.6;
        color: var(--c-text-secondary);
    }
    
    /* Conversation */
    .comment-count {
        font-size: 0.8125rem;
        color: var(--c-text-muted);
    }
    
    .conversation-body {
        max-height: 500px;
        overflow-y: auto;
    }
    
    .empty-messages {
        padding: 2rem;
        text-align: center;
        color: var(--c-text-secondary);
    }
    
    .empty-messages p {
        margin: 0 0 0.25rem;
        font-weight: 500;
    }
    
    /* Messages */
    .messages-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .message {
        display: flex;
        gap: 0.75rem;
    }
    
    .message-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .message-client .message-avatar {
        background: var(--info-bg);
    }
    
    .message-staff .message-avatar {
        background: rgba(201, 162, 39, 0.2);
    }
    
    .message-content {
        flex: 1;
        min-width: 0;
    }
    
    .message-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.375rem;
    }
    
    .message-author {
        font-weight: 600;
        font-size: 0.875rem;
        color: var(--c-text-primary);
    }
    
    .message-time {
        font-size: 0.75rem;
        color: var(--c-text-muted);
    }
    
    .message-body {
        background: var(--c-bg-secondary);
        padding: 0.875rem 1rem;
        border-radius: 0 12px 12px 12px;
        line-height: 1.5;
        white-space: pre-wrap;
        color: var(--c-text-primary);
    }
    
    .message-staff .message-body {
        background: rgba(201, 162, 39, 0.1);
        border-radius: 12px 0 12px 12px;
    }
    
    /* Reply Section */
    .reply-section {
        border-top: 1px solid var(--c-border);
        padding: 1rem 1.25rem;
        background: var(--c-bg-secondary);
    }
    
    .alert {
        padding: 0.75rem 1rem;
        border-radius: 6px;
        margin-bottom: 1rem;
        font-size: 0.875rem;
    }
    
    .alert-danger {
        background: var(--danger-bg);
        color: var(--c-danger);
    }
    
    .alert-success {
        background: var(--success-bg);
        color: var(--c-success);
    }
    
    .reply-form {
        display: flex;
        gap: 0.75rem;
        align-items: flex-end;
    }
    
    .reply-form textarea {
        flex: 1;
        resize: vertical;
        min-height: 60px;
    }
    
    .reply-form .btn {
        flex-shrink: 0;
    }
    
    .conversation-closed {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 1rem 1.25rem;
        background: var(--bg-secondary);
        border-top: 1px solid var(--c-border);
        flex-wrap: wrap;
    }
    
    .conversation-closed span {
        color: var(--c-text-muted);
        font-size: 0.875rem;
    }
    
    @media (max-width: 640px) {
        .reply-form {
            flex-direction: column;
        }
        
        .reply-form .btn {
            width: 100%;
        }
        
        .conversation-closed {
            flex-direction: column;
            text-align: center;
        }
    }

/* Tickets PAGE */
    .page-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 24px;
        flex-wrap: wrap;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--c-text-primary);
        margin: 0 0 4px;
    }
    
    .subtitle { color: var(--c-text-secondary); margin: 0; }
    
    .btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 18px;
        border-radius: 8px;
        font-size: 0.875rem;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.15s;
        cursor: pointer;
        border: none;
    }
    
    .btn-primary {
        background: var(--c-primary);
        color: var(--c-primary);
    }
    
    .btn-primary:hover { filter: brightness(1.1); }
    
    /* Stats */
    .stats-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .stat-box {
        background: var(--c-bg-primary);
        border: 1px solid var(--c-border);
        border-radius: 10px;
        padding: 16px;
        text-align: center;
    }
    
    .stat-box.stat-gold { background: rgba(201, 162, 39, 0.08); border-color: var(--c-primary); }
    .stat-box.stat-info { background: var(--info-bg); }
    .stat-box.stat-success { background: var(--success-bg); }
    
    .stat-value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--c-text-primary); }
    .stat-label { font-size: 0.75rem; color: var(--c-text-secondary); }
    
    /* Filters */
    .filters-card {
        margin-bottom: 20px;
    }
    
    .filters-row {
        display: flex;
        gap: 16px;
        padding: 16px;
        flex-wrap: wrap;
    }
    
    .form-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-width: 150px;
    }
    
    .form-group label {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--c-text-secondary);
        text-transform: uppercase;
    }
    
    .form-group input,
    .form-group select {
        padding: 8px 12px;
        border: 1px solid var(--c-border);
        border-radius: 6px;
        font-size: 0.875rem;
        background: var(--c-bg-secondary);
        color: var(--c-text-primary);
    }
    
    .form-group input:focus,
    .form-group select:focus {
        outline: none;
        border-color: var(--c-primary);
    }
    
    /* Card & Table */
    .card {
        background: var(--c-bg-primary);
        border: 1px solid var(--c-border);
        border-radius: 12px;
        overflow: hidden;
    }
    
    .loading-state,
    .empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 60px 20px;
        text-align: center;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        border: 3px solid var(--c-border);
        border-top-color: var(--c-primary);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin-bottom: 16px;
    }
    
    
    .empty-icon { font-size: 3rem; margin-bottom: 16px; }
    .empty-state h3 { margin: 0 0 8px; color: var(--c-text-primary); }
    .empty-state p { margin: 0 0 20px; color: var(--c-text-secondary); }
    
    /* Lista zgłoszeń - karty */
    .tickets-list {
        display: flex;
        flex-direction: column;
    }
    
    .ticket-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        text-decoration: none;
        color: inherit;
        border-bottom: 1px solid var(--c-border);
        transition: background 0.15s;
    }
    
    .ticket-card:last-child {
        border-bottom: none;
    }
    
    .ticket-card:hover {
        background: var(--c-bg-hover);
    }
    
    .ticket-card.has-unread {
        background: rgba(201, 162, 39, 0.04);
    }
    
    .ticket-card.is-closed {
        opacity: 0.6;
    }
    
    .ticket-main {
        flex: 1;
        min-width: 0;
    }
    
    .ticket-title-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
    }
    
    .unread-indicator {
        width: 8px;
        height: 8px;
        background: var(--c-primary);
        border-radius: 50%;
        flex-shrink: 0;
    }
    
    .ticket-title {
        font-weight: 600;
        font-size: 15px;
        color: var(--c-text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .ticket-meta {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .ticket-date {
        font-size: 13px;
        color: var(--c-text-muted);
        white-space: nowrap;
        margin-left: 16px;
    }
    
    .status-badge {
        display: inline-block;
        padding: 3px 10px;
        border-radius: 4px;
        color: white;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .priority-badge {
        display: inline-block;
        padding: 3px 10px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .priority-low { background: var(--bg-secondary); color: var(--c-text-secondary); }
    .priority-normal { background: var(--info-bg); color: var(--c-info); }
    .priority-high { background: var(--warning-bg); color: var(--c-warning); }
    .priority-urgent { background: var(--danger-bg); color: var(--c-danger); }
    
    .comment-count { 
        font-size: 12px;
        color: var(--c-text-secondary); 
    }
    
    @media (max-width: 768px) {
        .page-header { flex-direction: column; align-items: stretch; }
        
        .ticket-card {
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
        }
        
        .ticket-date {
            margin-left: 0;
        }
    }

