/* Shared Application Styles */
.container {
    max-width: 800px;
    width: 90%;
    background: transparent;
    padding: 4rem;
    margin: 4rem 0;
    border-radius: 12px;
    border: 1px solid rgba(241, 245, 249, 0.2);
    z-index: 10;
    position: relative;
}

.auth-doc {
    background: transparent;
    border: 1px solid rgba(238, 238, 238, 0.2);
    padding: 3rem;
    margin-bottom: 3rem;
    font-family: var(--font-main);
    line-height: 1.8;
    color: #334155;
    position: relative;
}

.auth-doc::before {
    content: "DRAFT_CONFIDENTIAL";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 5rem;
    color: rgba(0,0,0,0.02);
    pointer-events: none;
    font-family: var(--font-exo);
    font-weight: 900;
}

.auth-header {
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.auth-title {
    font-family: var(--font-exo);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-blue);
    text-transform: uppercase;
    margin: 0;
}

/* Signature Area */
.signature-area {
    margin-top: 3rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
}

.sig-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.sig-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid var(--accent-teal);
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    padding: 0.5rem 0;
    background: transparent;
    outline: none;
}

.sig-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
}

/* Signature Font Selector */
.sig-font-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 25px;
    transition: opacity 0.3s ease;
}

.font-option {
    padding: 8px 5px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    color: #475569;
    text-align: center;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    overflow: hidden;
}

.font-preview {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 4px;
}

.font-option:hover {
    border-color: var(--accent-teal);
    background: rgba(0, 168, 181, 0.02);
}

.font-option.active {
    border-color: var(--accent-teal);
    background: rgba(0, 168, 181, 0.05);
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(0, 168, 181, 0.1);
}

.font-option-label {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: #94a3b8;
    text-transform: uppercase;
}

.font-option.active .font-option-label {
    color: var(--accent-teal);
}

/* Form Styles */
.form-group { margin-bottom: 2rem; }
label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    color: var(--accent-teal);
}

input, textarea, select {
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--text-dark);
    padding: 1rem;
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 1rem;
    box-sizing: border-box;
}

input:focus, textarea:focus {
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 74, 128, 0.05);
}

/* Post-Payment Outcome UI */
#outcome-container {
    text-align: center;
    padding: 3rem 0;
    width: 100%;
    animation: contentFadeIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes contentFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.outcome-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    position: relative;
    transition: all 0.5s ease;
}

.outcome-icon-wrap i { font-size: 2.5rem; }

.state-success .outcome-icon-wrap {
    background: rgba(0, 168, 181, 0.05);
    border: 2px solid var(--accent-teal);
    box-shadow: 0 0 30px rgba(0, 168, 181, 0.1);
}
.state-success .outcome-icon-wrap i { color: var(--accent-teal); }

.state-pending .outcome-icon-wrap {
    background: rgba(234, 179, 8, 0.05);
    border: 2px solid #eab308;
    box-shadow: 0 0 30px rgba(234, 179, 8, 0.1);
}
.state-pending .outcome-icon-wrap i { color: #eab308; }

.state-error .outcome-icon-wrap {
    background: rgba(239, 68, 68, 0.05);
    border: 2px solid #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.1);
}
.state-error .outcome-icon-wrap i { color: #ef4444; }

.outcome-header {
    font-family: var(--font-exo);
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

.outcome-sub {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #64748b;
    letter-spacing: 1px;
    margin: 0 auto 3rem;
    max-width: 500px;
    line-height: 1.6;
}

.cta-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.cta-btn-primary {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 1.2rem;
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 74, 128, 0.1);
}

.cta-btn-primary:hover {
    transform: translateY(-3px);
    background: #005691;
    box-shadow: 0 15px 35px rgba(0, 74, 128, 0.2);
}

.cta-btn-secondary {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    padding: 1.1rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.cta-btn-secondary:hover {
    border-color: #94a3b8;
    color: #475569;
    background: #f8fafc;
}

/* Portal Specifics */
.inbox-card {
    background: rgba(0, 74, 128, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .inbox-card {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.status-pill {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.diagnostic-console {
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    height: 200px;
    overflow-y: auto;
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
}

[data-theme="dark"] .diagnostic-console {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
}

/* Responsive App */
@media (max-width: 600px) {
    .container { padding: 2rem; width: 95%; }
    .outcome-header { font-size: 1.4rem; }
    .cta-group { max-width: 100%; }
}
