/**
 * 7xeh.dev Portal Styles
 * Modern dark theme with purple accents - extends home.css
 */

/* Portal-specific variables */
:root {
    --card: rgba(17, 17, 20, 0.85);
    --glass: rgba(255, 255, 255, 0.03);
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

main.portal-shell {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    margin: 0 auto;
    padding: 140px 20px 96px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Hero Section */
.portal-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: space-between;
    align-items: flex-start;
}

.portal-hero h1 {
    margin: 8px 0 14px;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.portal-hero h1 .gradient {
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portal-hero .lede {
    margin: 0;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 12px;
    color: var(--brand);
    margin: 0;
    font-weight: 600;
}

.cta-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 16px;
    padding: 18px 22px;
    max-width: 320px;
}

.cta-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--brand-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--brand);
}

.cta-icon i {
    width: 20px;
    height: 20px;
}

.cta-box strong {
    display: block;
    margin-bottom: 4px;
}

.cta-box p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Cards */
.portal-card {
    background: var(--card);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-title i {
    width: 24px;
    height: 24px;
    color: var(--brand);
}

.card-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* Forms */
form#portal-form {
    display: grid;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.field span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.field span i {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.field input {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    padding: 14px 16px;
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s var(--transition);
    font-family: inherit;
}

.field input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Buttons */
button {
    border: none;
    border-radius: 12px;
    padding: 14px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--transition);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button i {
    width: 16px;
    height: 16px;
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

button.primary {
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    box-shadow: 0 4px 20px var(--brand-glow);
}

button.primary:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px var(--brand-glow);
    filter: brightness(1.1);
}

button.secondary {
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--border);
}

button.secondary:hover:not(:disabled) {
    background: var(--bg-soft);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

button.ghost {
    background: transparent;
    color: var(--muted);
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

button.ghost:hover:not(:disabled) {
    border-color: var(--brand);
    color: var(--brand-light);
}

button.warn {
    background: linear-gradient(135deg, var(--warn), #f59e0b);
    color: #000;
}

button.warn:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Feedback */
.feedback {
    margin-top: 18px;
    min-height: 22px;
    color: var(--text-secondary);
    font-size: 14px;
}

.feedback.is-error {
    color: var(--danger);
}

.feedback.is-success {
    color: var(--success);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.card-header h2 {
    margin: 4px 0 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    word-break: break-all;
}

/* Badges */
.badge {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
    background: var(--brand-soft);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--brand);
}

.badge[data-state="active"] {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.badge[data-state="frozen"] {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.badge[data-state="expired"] {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

/* Details Grid */
.details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.details dt {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.details dd {
    margin: 6px 0 0;
    font-size: 15px;
    font-weight: 500;
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

/* Callouts */
.callouts {
    display: grid;
    gap: 14px;
}

.callout {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    background: var(--glass);
    transition: border-color 0.2s;
}

.callout:hover {
    border-color: var(--border-hover);
}

.callout strong {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    main.portal-shell {
        padding: 120px 16px 64px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .portal-card {
        padding: 22px;
    }
    
    .cta-box {
        max-width: 100%;
    }
}
