/* app.css bundle: logo + icons + forms + modals */

/* ===== logo.css ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    min-width: max-content;
}

.logo-image {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    gap: 2px;
    white-space: nowrap;
}

.logo-text span {
    display: block;
    font-weight: 700;
    font-size: 1.85rem;
    letter-spacing: -0.02em;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.logo-text span:nth-child(1) {
    background-image: linear-gradient(135deg, var(--text-heading) 0%, var(--text-secondary) 50%, var(--text-heading) 100%);
}

.logo-text span:nth-child(2) {
    background-image: var(--gradient-primary);
}

/* When logo text is a single word (e.g. Lootlee), keep the branded gradient. */
.logo-text span:only-child {
    background-image: var(--gradient-primary);
}

.logo-small .logo-image {
    width: 64px;
    height: 64px;
}

.logo-small .logo-text {
    flex-direction: row;
    gap: 6px;
    align-items: baseline;
}

.logo-small .logo-text span {
    font-size: 1.9rem;
    font-weight: 900;
}

@media (max-width: 768px) {
    .logo-image {
        width: 40px;
        height: 40px;
    }

    .logo-text span {
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    .logo-small {
        align-items: center;
    }

    .logo-small .logo-image {
        width: 36px;
        height: 36px;
    }

    .logo-small .logo-text {
        display: flex;
        flex-direction: row;
        gap: 4px;
        align-items: baseline;
    }

    .logo-small .logo-text span {
        font-size: 1.35rem;
        font-weight: 900;
        letter-spacing: -0.01em;
    }
}

/* ===== icons.css ===== */
.icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    flex-shrink: 0;
}

.icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-search {
    color: var(--text-muted);
}

.icon-bell {
    color: var(--text-secondary);
}

.icon-user {
    color: var(--text-primary);
}

.icon-close {
    color: var(--text-secondary);
}

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

/* ===== forms.css ===== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-label-required::after {
    content: " *";
    color: var(--status-error);
}

.form-input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

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

.form-input-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    width: 24px;
    height: 24px;
}

.form-input-toggle:hover {
    color: var(--text-primary);
}

.form-input-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-input-toggle .icon-eye-off {
    display: none;
}

.form-input-toggle.active .icon-eye {
    display: none;
}

.form-input-toggle.active .icon-eye-off {
    display: block;
}

.form-error {
    color: var(--status-error);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.form-checkbox-input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.form-checkbox-label {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-checkbox-label a {
    color: var(--accent-primary);
    text-decoration: none;
}

.form-checkbox-label a:hover {
    text-decoration: underline;
}

.password-strength {
    margin-top: 8px;
}

.password-strength__bars {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.password-strength__bar {
    flex: 1;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    transition: background 0.2s ease;
}

.password-strength__bar[data-strength="0"] {
    background: var(--status-error);
}

.password-strength__bar[data-strength="1"] {
    background: var(--status-error);
}

.password-strength__bar[data-strength="2"] {
    background: var(--status-warning);
}

.password-strength__bar[data-strength="3"] {
    background: var(--accent-secondary);
}

.password-strength__bar[data-strength="4"] {
    background: var(--status-success);
}

.password-strength__text {
    font-size: 12px;
    color: var(--text-muted);
}

.btn--full {
    width: 100%;
}

.btn--lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    text-decoration: underline;
}

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

.input--error {
    border-color: var(--status-error);
}

.input--error:focus {
    border-color: var(--status-error);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ===== modals.css ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(14, 9, 17, 0.6);
    animation: modalSlideIn 0.2s ease;
}

@media (max-width: 600px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 10px;
    }

    .modal {
        max-width: 100%;
        max-height: min(88dvh, 760px);
        border-radius: 16px;
    }

    .modal-body {
        max-height: 56dvh;
        overflow-y: auto;
    }

    .modal-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-size: 20px;
    line-height: 1;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer .btn {
    flex: 1;
}
