/* ===========================================
   MTEK - Login Page Styles
   Mobile-first, clean design
   =========================================== */

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    padding-bottom: 1rem;
    background-color: #f5f5f5;
}

/* Back button */
.login-back-btn {
    position: fixed;
    top: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #86868b;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.login-back-btn:active {
    background: rgba(0, 0, 0, 0.06);
    color: #1d1d1f;
}

.login-container {
    width: 100%;
    max-width: 380px;
    padding: 2rem 1.5rem;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-logo-text {
    font-size: 2.75rem;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.04em;
    margin: 0;
}

.login-logo-accent {
    color: #42B0D5;
}

.login-subtitle {
    font-size: 0.9375rem;
    color: #86868b;
    font-weight: 400;
}

/* Input Group */
.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.input-hint {
    font-size: 0.8125rem;
    color: #86868b;
    margin-bottom: 0.75rem;
}

.input-field {
    width: 100%;
    height: 52px;
    padding: 0 1rem;
    font-size: 1.0625rem;
    font-family: inherit;
    color: #1d1d1f;
    background: #fff;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.input-field:focus {
    border-color: #42B0D5;
}

.input-field::placeholder {
    color: #c7c7cc;
}

/* Phone input with prefix */
.phone-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.phone-prefix {
    position: absolute;
    left: 1rem;
    font-size: 1.0625rem;
    font-weight: 500;
    color: #86868b;
    pointer-events: none;
    z-index: 1;
}

.phone-field {
    padding-left: 3.75rem;
}

/* Code input */
.code-field {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5rem;
    padding-left: 1.5rem;
}

/* Button */
.login-btn {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #42B0D5;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.login-btn:active {
    transform: scale(0.98);
}

.login-btn:disabled {
    background: #c7c7cc;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Link button */
.login-link {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: #42B0D5;
    background: none;
    border: none;
    cursor: pointer;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.login-link:active {
    opacity: 0.7;
}

/* Error message */
.login-error {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border-radius: 10px;
    text-align: center;
}

/* Org selector */
.org-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.org-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    cursor: pointer;
    transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 3px rgba(0,0,0, 0.04), 0 4px 16px rgba(0,0,0, 0.02);
}

.org-card:active {
    transform: scale(0.985);
}

.org-card.selected {
    border-color: #42B0D5;
    background: rgba(66, 176, 213, 0.08);
    box-shadow: 0 0 0 3px rgba(66, 176, 213, 0.15), 0 8px 24px rgba(66, 176, 213, 0.1);
}

.org-card-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.015em;
}

.org-card-role {
    font-size: 0.75rem;
    font-weight: 500;
    color: #86868b;
}

/* Branding */
.login-branding {
    position: fixed;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #b0b0b8;
    text-transform: uppercase;
}

/* Signup link */
.login-signup-link {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #86868b;
}

.login-signup-link a {
    color: #42B0D5;
    text-decoration: none;
    font-weight: 500;
}

.login-signup-link a:active {
    opacity: 0.7;
}

/* Desktop */
@media (min-width: 768px) {
    .login-container {
        padding: 3rem 2rem;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }
}
