/* Inclawbate — UI Components */
/* Clawnch-aligned: uppercase mono buttons, warm cards, lobster accents */

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--lobster-400);
    color: var(--text-on-accent);
    border-color: var(--lobster-400);
}

.btn-primary:hover:not(:disabled) {
    background: var(--lobster-300);
    border-color: var(--lobster-300);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: hsl(12, 3%, 56%);
    border: 1px solid hsl(12, 2%, 32%);
}

.btn-secondary:hover:not(:disabled) {
    border-color: hsl(12, 2%, 44%);
    color: hsl(12, 5%, 82%);
    background: var(--bg-card);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    color: var(--text-primary);
    background: var(--bg-card);
}

.btn-danger {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid hsla(0, 65%, 55%, 0.2);
}

.btn-danger:hover:not(:disabled) {
    background: hsla(0, 65%, 55%, 0.2);
}

.btn-teal {
    background: var(--seafoam-500);
    color: var(--text-on-accent);
    border-color: var(--seafoam-500);
}

.btn-teal:hover:not(:disabled) {
    background: var(--seafoam-400);
    box-shadow: var(--shadow-glow-teal);
    transform: translateY(-1px);
}

.btn-sm {
    padding: var(--space-sm) 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 0.9rem;
}

.btn-icon {
    padding: var(--space-sm);
    width: 36px;
    height: 36px;
}

/* ── Cards ── */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s var(--ease-smooth);
}

.card:hover {
    border-color: var(--border-default);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.card-body {
    padding: var(--space-xl);
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: hsla(9, 52%, 54%, 0.15);
    color: var(--lobster-300);
    border: 1px solid hsla(9, 52%, 54%, 0.25);
}

.badge-green {
    background: hsla(172, 27%, 46%, 0.15);
    color: var(--seafoam-400);
    border: 1px solid hsla(172, 27%, 46%, 0.25);
}

.badge-red {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid hsla(0, 65%, 55%, 0.25);
}

.badge-yellow {
    background: hsla(32, 27%, 64%, 0.15);
    color: var(--sand-300);
    border: 1px solid hsla(32, 27%, 64%, 0.25);
}

.badge-neutral {
    background: hsla(12, 2%, 44%, 0.1);
    color: var(--text-dim);
    border: 1px solid hsla(12, 2%, 44%, 0.15);
}

.badge-blue {
    background: hsla(215, 40%, 50%, 0.15);
    color: hsl(215, 40%, 62%);
    border: 1px solid hsla(215, 40%, 50%, 0.25);
}

/* ── Inputs ── */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.input-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.input {
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
    outline: none;
}

.input:focus {
    border-color: var(--lobster-400);
}

.input::placeholder {
    color: var(--text-dim);
}

textarea.input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.65;
}

/* ── Select ── */
.select {
    appearance: none;
    padding: var(--space-sm) 32px var(--space-sm) 12px;
    background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='hsl(12,2%25,44%25)'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
}

.select:focus {
    border-color: var(--lobster-400);
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.15s ease;
}

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: fadeInScale 0.2s var(--ease-smooth);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

/* ── Phase Stepper ── */
.stepper {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.stepper-step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.stepper-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid var(--border-default);
    color: var(--text-dim);
    transition: all var(--transition-base);
}

.stepper-dot.active {
    background: var(--lobster-400);
    border-color: var(--lobster-400);
    color: var(--text-on-accent);
    box-shadow: var(--shadow-glow);
}

.stepper-dot.complete {
    background: var(--seafoam-400);
    border-color: var(--seafoam-400);
    color: white;
}

.stepper-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
}

.stepper-step.active .stepper-label {
    color: var(--text-primary);
}

.stepper-step.complete .stepper-label {
    color: var(--seafoam-400);
}

.stepper-line {
    flex: 1;
    height: 2px;
    background: var(--border-default);
    min-width: 20px;
}

.stepper-line.complete {
    background: var(--seafoam-400);
}

/* ── Stat Display ── */
.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
    min-width: 100px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.stat-value.lobster { color: var(--lobster-400); }
.stat-value.teal { color: var(--seafoam-400); }
.stat-value.gold { color: var(--sand-300); }
.stat-value.blue { color: var(--blue-400); }

/* ── Color Swatch ── */
.swatch-row {
    display: flex;
    gap: var(--space-xs);
}

.swatch {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

/* ── Spinner ── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-default);
    border-top-color: var(--lobster-400);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-lg {
    width: 36px;
    height: 36px;
    border-width: 3px;
}

/* ── Toast / Notification ── */
.toast {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    z-index: 2000;
    animation: fadeInUp 0.2s var(--ease-smooth);
}

.toast-success { border-color: var(--seafoam-400); }
.toast-error { border-color: var(--red); }

/* ── Divider ── */
.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-lg) 0;
}

/* ── Tabs ── */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-subtle);
}

.tab {
    padding: var(--space-sm) var(--space-lg);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--text-secondary);
}

.tab.active {
    color: var(--lobster-400);
    border-bottom-color: var(--lobster-400);
}

/* ── Checklist ── */
.checklist-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
}

.checklist-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.checklist-icon.done {
    background: var(--seafoam-400);
    border-color: var(--seafoam-400);
    color: white;
}

.checklist-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-lg);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.3;
    filter: drop-shadow(0 0 12px hsla(9, 52%, 54%, 0.2));
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.empty-state-desc {
    font-size: 0.875rem;
    color: var(--text-dim);
    max-width: 400px;
    margin: 0 auto var(--space-lg);
}

/* ── Live Dot ── */
.live-dot {
    position: relative;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--seafoam-400);
}

.live-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--seafoam-400);
    animation: ping 2s ease-out infinite;
}

/* ── Nav ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: hsla(12, 6%, 5%, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--lobster-300);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-link {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--lobster-400);
}

/* ── Footer ── */
.footer {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-sm);
}

.footer-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--lobster-300);
}

@media (max-width: 768px) {
    .nav { padding: 0 var(--space-md); }
    .nav-links .nav-link { display: none; }
}
