/* TRC BUILDER — Component Styles (Mobile-First) */

/* ── Forms ── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.form-link {
    font-size: 0.8rem;
    color: var(--brand-primary-light);
    font-weight: 500
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center
}

.input-wrapper svg {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    pointer-events: none
}

.input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 42px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary)
}

.input-wrapper input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15)
}

.input-action {
    position: absolute;
    right: 8px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    border-radius: var(--radius-sm)
}

.input-action svg {
    width: 16px;
    height: 16px
}

.form-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.85rem;
    animation: slideDown var(--duration-normal) var(--ease-out)
}

.form-alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-surface-3);
    border-radius: 2px;
    overflow: hidden
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width var(--duration-normal)
}

/* ── Auth Pages ── */
.auth-page .sidebar,
.auth-page .topbar,
.auth-page .sidebar-overlay {
    display: none !important
}

.auth-page .main-content {
    margin-left: 0 !important
}

.auth-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh
}

.auth-branding {
    padding: 24px;
    background: linear-gradient(135deg, #f0f7ff 0%, #fdf4e8 50%, #fce7e7 100%);
    position: relative;
    overflow: hidden
}

.auth-branding::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at 30% 30%, rgba(13, 148, 136, 0.1) 0%, transparent 50%);
    animation: bgShift 20s ease-in-out infinite alternate
}

@keyframes bgShift {
    0% {
        transform: translate(0, 0)
    }

    100% {
        transform: translate(2%, 2%)
    }
}

.auth-branding-content {
    position: relative;
    z-index: 1
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.3)
}

.brand-icon svg {
    width: 24px;
    height: 24px
}

.brand-logo h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary)
}

.brand-logo h1 span {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary)
}

.brand-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5
}

.brand-tagline strong {
    color: var(--text-primary)
}

.brand-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap
}

.stat-item {
    text-align: center
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px
}

.brand-features {
    display: none
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem
}

.feature-item svg {
    width: 18px;
    height: 18px;
    color: var(--brand-secondary);
    flex-shrink: 0
}

.auth-form-panel {
    width: 100%;
    padding: 24px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color)
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto
}

.auth-form-header {
    margin-bottom: 24px
}

.auth-form-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px
}

.auth-form-header p {
    color: var(--text-secondary);
    font-size: 0.85rem
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color)
}

.auth-divider span {
    font-size: 0.8rem;
    color: var(--text-tertiary)
}

.auth-footer-text {
    margin-top: 20px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-tertiary)
}




/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE COMPONENTS — MOBILE ONLY
   Desktop remains 100% unchanged
   ══════════════════════════════════════════════════════════════════ */

/* ── Phone ── */
@media (max-width: 480px) {
    .btn { padding: 12px 16px; font-size: 0.82rem; min-height: 44px; }
    .btn-sm { padding: 8px 12px; min-height: 36px; }
    .btn svg { width: 18px; height: 18px; flex-shrink: 0; }

    .input-wrapper input {
        padding: 14px 12px 14px 42px;
        font-size: 16px;
    }

    .modal-body input[type="text"],
    .modal-body input[type="email"],
    .modal-body input[type="tel"],
    .modal-body select {
        padding: 12px;
        font-size: 16px;
    }

    .form-group label { font-size: 0.7rem; }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .section-title { font-size: 0.9rem; }

    .page-content {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .sidebar {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

/* ── iPad ── */
@media (min-width: 769px) and (max-width: 1024px) {
    .form-row { grid-template-columns: 1fr 1fr; }
    .section-title { font-size: 1.05rem; }
}
