﻿/* ========================================
   RESET & BASE STYLES
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary-color: #ec1b24;
    --primary-hover: #b7151b;
    --primary-gradient: linear-gradient(90deg, #922D31 0%, #EC1B24 100%);
    --secondary-gradient: linear-gradient(90deg, #6c757d 0%, #5a6268 100%);
    --secondary-hover: linear-gradient(90deg, #5a6268 0%, #495057 100%);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-backdrop: blur(40px);
    --glass-light: rgba(255, 255, 255, 0.6);
    --glass-light-border: rgba(255, 255, 255, 0.3);
    --success-bg: #d4edda;
    --success-color: #155724;
    --success-border: #c3e6cb;
    --warning-bg: #fff3cd;
    --warning-color: #856404;
    --warning-border: #ffeaa7;
    --danger-bg: #f8d7da;
    --danger-color: #721c24;
    --danger-border: #f5c6cb;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #aaa;
    --text-disabled: #6c757d;
    --border-color: #ccc;
    --shadow-modal: 0 8px 30px rgba(0, 0, 0, 0.2);
    --shadow-focus: 0 0 0 2px rgba(236, 27, 36, 0.2);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --transition: all 0.3s ease;
    --font-family: Arial, sans-serif;
    --font-mono: 'Courier New', monospace;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background: url('../Images/back.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */
.background-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

.login-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* ========================================
   MODAL COMPONENTS
   ======================================== */
.custom-modal {
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    padding: 2rem;
    border-radius: var(--border-radius-xl);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-modal);
    animation: fadeIn 0.3s ease-in-out;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.custom-modal-header {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.logo {
    width: 150px;
    margin-bottom: 10px;
    max-width: 100%;
    height: auto;
}

/* ========================================
   FORM COMPONENTS
   ======================================== */
form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    align-self: flex-start;
}

/* Input Base Styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    background-color: #fff;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-focus);
}

input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* OTP-specific input styling */
.otp-input {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 3px;
    font-family: var(--font-mono);
}

    .otp-input:focus {
        box-shadow: 0 0 0 3px rgba(236, 27, 36, 0.2);
    }

/* ========================================
   BUTTON COMPONENTS
   ======================================== */
button {
    width: 100%;
    padding: 10px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    min-height: 44px; /* Accessibility: minimum touch target */
}

    button:hover:not(:disabled),
    button:focus:not(:disabled) {
        background-color: var(--primary-hover);
        outline: none;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(236, 27, 36, 0.3);
    }

    button:active:not(:disabled) {
        transform: translateY(0);
    }

    button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        background: #999;
    }

.btn-secondary {
    background: var(--secondary-gradient);
    width: auto;
    min-width: 120px;
}

    .btn-secondary:hover:not(:disabled) {
        background: var(--secondary-hover);
    }

.resend-btn {
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 15px;
    border-radius: 6px;
    transition: var(--transition);
    font-weight: 500;
    width: auto;
    min-height: 40px;
}

    .resend-btn:hover:not(:disabled) {
        background-color: rgba(236, 27, 36, 0.1);
        text-decoration: none;
    }

    .resend-btn:disabled {
        color: var(--text-disabled);
        cursor: not-allowed;
        text-decoration: none;
        background-color: transparent;
    }

/* ========================================
   ALERT COMPONENTS
   ======================================== */
.alert {
    width: 100%;
    margin-bottom: 1rem;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid;
}

.alert-danger {
    color: var(--danger-color);
    background-color: var(--danger-bg);
    border-color: var(--danger-border);
}

.alert-success {
    background-color: var(--success-bg);
    color: var(--success-color);
    border-color: var(--success-border);
}

.alert-warning {
    background-color: var(--warning-bg);
    color: var(--warning-color);
    border-color: var(--warning-border);
}

.text-danger {
    color: #dc3545;
    font-size: 12px;
    margin-top: -10px;
    margin-bottom: 10px;
    display: block;
}

/* ========================================
   OTP-SPECIFIC COMPONENTS
   ======================================== */
.countdown-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--glass-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-light-border);
    padding: 12px 16px;
}

.countdown-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

#countdown {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    font-family: var(--font-mono);
    user-select: none;
}

    #countdown.warning {
        color: #ffc107;
        animation: pulse 2s infinite;
    }

    #countdown.expired {
        color: #999999;
        font-style: italic;
        animation: pulseFade 1.5s infinite;
    }

.resend-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 15px 0;
    text-align: center;
}

.otp-note {
    margin-top: 15px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    padding: 15px;
    background-color: var(--glass-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid var(--glass-light-border);
    line-height: 1.4;
}

.expired-message {
    text-align: center;
    padding: 25px;
    background-color: rgba(248, 215, 218, 0.9);
    color: var(--danger-color);
    border-radius: var(--border-radius-lg);
    margin: 15px 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--danger-border);
}

    .expired-message h4 {
        margin: 0 0 10px 0;
        color: var(--primary-color);
        font-size: 18px;
    }

    .expired-message p {
        margin: 8px 0;
        font-size: 14px;
        line-height: 1.4;
    }

/* ========================================
   FOOTER & LAYOUT
   ======================================== */
.custom-modal-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

    .custom-modal-footer button,
    .custom-modal-footer a {
        flex: 1;
        max-width: 150px;
    }

/* ========================================
   UTILITY COMPONENTS
   ======================================== */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes pulseFade {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Large Desktop: 1920px and above */
@media (min-width: 1920px) {
    .custom-modal {
        max-width: 480px;
        padding: 2.5rem;
    }

    .custom-modal-header {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }

    .logo {
        width: 180px;
        margin-bottom: 15px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        font-size: 15px;
        padding: 12px;
    }

    button {
        font-size: 15px;
        padding: 12px;
        min-height: 48px;
    }

    .otp-input {
        font-size: 22px;
        letter-spacing: 4px;
    }
}

/* Desktop Large: 1440px - 1919px */
@media (min-width: 1440px) and (max-width: 1919px) {
    .custom-modal {
        max-width: 440px;
        padding: 2.25rem;
    }

    .logo {
        width: 165px;
    }
}

/* Desktop Standard: 1200px - 1439px */
@media (min-width: 1200px) and (max-width: 1439px) {
    .custom-modal {
        max-width: 420px;
        padding: 2rem;
    }

    .logo {
        width: 155px;
    }
}

/* Laptop/Tablet Landscape: 992px - 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    .login-container {
        padding: 18px;
    }

    .custom-modal {
        max-width: 400px;
        padding: 1.875rem;
    }

    .custom-modal-header {
        font-size: 1.4375rem;
    }

    .logo {
        width: 145px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        font-size: 13.5px;
        padding: 10px;
    }

    button {
        font-size: 13.5px;
        min-height: 44px;
    }
}

/* Tablet Portrait: 768px - 991px */
@media (min-width: 768px) and (max-width: 991px) {
    .login-container {
        padding: 16px;
    }

    .custom-modal {
        max-width: 380px;
        padding: 1.75rem;
        border-radius: 15px;
    }

    .custom-modal-header {
        font-size: 1.375rem;
        margin-bottom: 0.9375rem;
    }

    .logo {
        width: 140px;
        margin-bottom: 8px;
    }

    label {
        font-size: 12.5px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        font-size: 13px;
        padding: 9px;
        margin-bottom: 14px;
        border-radius: 7px;
    }

    button {
        font-size: 13px;
        padding: 9px;
        min-height: 44px;
        border-radius: 7px;
    }

    .otp-input {
        font-size: 19px;
        letter-spacing: 2.5px;
    }

    .countdown-container {
        padding: 11px 14px;
        border-radius: 11px;
    }

    .countdown-text {
        font-size: 13.5px;
    }

    #countdown {
        font-size: 1.1875rem;
    }

    .otp-note {
        font-size: 12.5px;
        padding: 14px;
    }

    .expired-message {
        padding: 22px;
    }

        .expired-message h4 {
            font-size: 17px;
        }

        .expired-message p {
            font-size: 13.5px;
        }

    .custom-modal-footer {
        margin-top: 18px;
    }

        .custom-modal-footer button,
        .custom-modal-footer a {
            max-width: 140px;
        }
}

/* Mobile Landscape / Large Phones: 576px - 767px */
@media (min-width: 576px) and (max-width: 767px) {
    .login-container {
        padding: 14px;
    }

    .custom-modal {
        max-width: 95%;
        padding: 1.5rem 1.375rem;
        border-radius: 14px;
    }

    .custom-modal-header {
        font-size: 1.3125rem;
        margin-bottom: 0.875rem;
    }

    .logo {
        width: 130px;
        margin-bottom: 8px;
    }

    label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        font-size: 13px;
        padding: 9px;
        margin-bottom: 13px;
        border-radius: 7px;
    }

    button {
        font-size: 13px;
        padding: 9px;
        min-height: 44px;
        border-radius: 7px;
    }

    .btn-secondary {
        min-width: 110px;
    }

    .otp-input {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .countdown-container {
        padding: 10px 13px;
        border-radius: 10px;
    }

    .countdown-text {
        font-size: 13px;
    }

    #countdown {
        font-size: 1.125rem;
    }

    .resend-btn {
        font-size: 13px;
        padding: 7px 13px;
        min-height: 38px;
    }

    .otp-note {
        font-size: 12px;
        padding: 13px;
        margin-top: 13px;
        border-radius: 9px;
    }

    .expired-message {
        padding: 20px;
        margin: 13px 0;
    }

        .expired-message h4 {
            font-size: 16px;
            margin-bottom: 8px;
        }

        .expired-message p {
            font-size: 13px;
        }

    .custom-modal-footer {
        margin-top: 16px;
        gap: 8px;
    }

        .custom-modal-footer button,
        .custom-modal-footer a {
            max-width: 130px;
        }

    .alert {
        font-size: 13px;
        padding: 9px;
        margin-bottom: 0.875rem;
    }

    .text-danger {
        font-size: 11.5px;
        margin-top: -9px;
        margin-bottom: 9px;
    }

    .spinner {
        width: 15px;
        height: 15px;
    }
}

/* Mobile Portrait / Standard Phones: 480px - 575px */
@media (min-width: 480px) and (max-width: 575px) {
    .login-container {
        padding: 12px;
    }

    .custom-modal {
        max-width: 100%;
        padding: 1.25rem 1.125rem;
        border-radius: 13px;
    }

    .custom-modal-header {
        font-size: 1.25rem;
        margin-bottom: 0.8125rem;
    }

    .logo {
        width: 120px;
        margin-bottom: 6px;
    }

    label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        font-size: 13px;
        padding: 8px;
        margin-bottom: 12px;
        border-radius: 6px;
    }

    button {
        font-size: 13px;
        padding: 8px;
        min-height: 44px;
        border-radius: 6px;
    }

    .btn-secondary {
        min-width: 100px;
    }

    .otp-input {
        font-size: 18px;
        letter-spacing: 2px;
        padding: 10px;
    }

    .countdown-container {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
        border-radius: 10px;
        text-align: center;
    }

    .countdown-text {
        font-size: 12.5px;
    }

    #countdown {
        font-size: 1.0625rem;
    }

    .resend-container {
        margin: 13px 0;
    }

    .resend-btn {
        font-size: 13px;
        padding: 7px 12px;
        min-height: 36px;
    }

    .otp-note {
        font-size: 11.5px;
        padding: 12px;
        margin-top: 12px;
        border-radius: 8px;
        line-height: 1.35;
    }

    .expired-message {
        padding: 18px;
        margin: 12px 0;
        border-radius: 10px;
    }

        .expired-message h4 {
            font-size: 15px;
            margin-bottom: 8px;
        }

        .expired-message p {
            font-size: 12.5px;
            margin: 6px 0;
        }

    .custom-modal-footer {
        flex-direction: column;
        margin-top: 15px;
        gap: 8px;
    }

        .custom-modal-footer button,
        .custom-modal-footer a {
            max-width: none;
            width: 100%;
        }

    .alert {
        font-size: 12.5px;
        padding: 8px;
        margin-bottom: 0.8125rem;
        border-radius: 5px;
    }

    .text-danger {
        font-size: 11px;
        margin-top: -8px;
        margin-bottom: 8px;
    }

    .spinner {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }
}

/* Small Mobile: 360px - 479px */
@media (min-width: 360px) and (max-width: 479px) {
    .login-container {
        padding: 10px;
    }

    .custom-modal {
        max-width: 100%;
        padding: 1rem 1rem;
        border-radius: 12px;
    }

    .custom-modal-header {
        font-size: 1.1875rem;
        margin-bottom: 0.75rem;
    }

    .logo {
        width: 110px;
        margin-bottom: 6px;
    }

    label {
        font-size: 11.5px;
        margin-bottom: 4px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        font-size: 12.5px;
        padding: 8px;
        margin-bottom: 12px;
        border-radius: 6px;
    }

    button {
        font-size: 12.5px;
        padding: 8px;
        min-height: 44px;
        border-radius: 6px;
    }

    .btn-secondary {
        min-width: 95px;
    }

    .otp-input {
        font-size: 17px;
        letter-spacing: 2px;
        padding: 9px;
    }

    .countdown-container {
        flex-direction: column;
        gap: 7px;
        padding: 9px;
        border-radius: 9px;
        text-align: center;
    }

    .countdown-text {
        font-size: 12px;
    }

    #countdown {
        font-size: 1rem;
    }

    .resend-container {
        margin: 12px 0;
    }

    .resend-btn {
        font-size: 12.5px;
        padding: 7px 11px;
        min-height: 36px;
    }

    .otp-note {
        font-size: 11px;
        padding: 11px;
        margin-top: 11px;
        border-radius: 8px;
        line-height: 1.3;
    }

    .expired-message {
        padding: 16px;
        margin: 11px 0;
        border-radius: 9px;
    }

        .expired-message h4 {
            font-size: 14px;
            margin-bottom: 7px;
        }

        .expired-message p {
            font-size: 12px;
            margin: 6px 0;
        }

    .custom-modal-footer {
        flex-direction: column;
        margin-top: 14px;
        gap: 7px;
    }

        .custom-modal-footer button,
        .custom-modal-footer a {
            max-width: none;
            width: 100%;
        }

    .alert {
        font-size: 12px;
        padding: 8px;
        margin-bottom: 0.75rem;
        border-radius: 5px;
    }

    .text-danger {
        font-size: 10.5px;
        margin-top: -8px;
        margin-bottom: 8px;
    }

    .spinner {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }
}

/* Extra Small Mobile: 320px - 359px */
@media (min-width: 320px) and (max-width: 359px) {
    .login-container {
        padding: 8px;
    }

    .custom-modal {
        max-width: 100%;
        padding: 0.875rem 0.875rem;
        border-radius: 11px;
    }

    .custom-modal-header {
        font-size: 1.125rem;
        margin-bottom: 0.6875rem;
    }

    .logo {
        width: 100px;
        margin-bottom: 5px;
    }

    label {
        font-size: 11px;
        margin-bottom: 3px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        font-size: 12px;
        padding: 7px;
        margin-bottom: 11px;
        border-radius: 5px;
    }

    button {
        font-size: 12px;
        padding: 7px;
        min-height: 42px;
        border-radius: 5px;
    }

    .btn-secondary {
        min-width: 90px;
    }

    .otp-input {
        font-size: 16px;
        letter-spacing: 1.5px;
        padding: 8px;
    }

    .countdown-container {
        flex-direction: column;
        gap: 6px;
        padding: 8px;
        border-radius: 8px;
        text-align: center;
    }

    .countdown-text {
        font-size: 11.5px;
    }

    #countdown {
        font-size: 0.9375rem;
    }

    .resend-container {
        margin: 11px 0;
    }

    .resend-btn {
        font-size: 12px;
        padding: 6px 10px;
        min-height: 34px;
    }

    .otp-note {
        font-size: 10.5px;
        padding: 10px;
        margin-top: 10px;
        border-radius: 7px;
        line-height: 1.3;
    }

    .expired-message {
        padding: 14px;
        margin: 10px 0;
        border-radius: 8px;
    }

        .expired-message h4 {
            font-size: 13px;
            margin-bottom: 6px;
        }

        .expired-message p {
            font-size: 11px;
            margin: 5px 0;
        }

    .custom-modal-footer {
        flex-direction: column;
        margin-top: 12px;
        gap: 6px;
    }

        .custom-modal-footer button,
        .custom-modal-footer a {
            max-width: none;
            width: 100%;
        }

    .alert {
        font-size: 11.5px;
        padding: 7px;
        margin-bottom: 0.6875rem;
        border-radius: 5px;
    }

    .text-danger {
        font-size: 10px;
        margin-top: -7px;
        margin-bottom: 7px;
    }

    .spinner {
        width: 13px;
        height: 13px;
        margin-right: 5px;
    }
}

/* Very Small Mobile: Below 320px */
@media (max-width: 319px) {
    .login-container {
        padding: 6px;
    }

    .custom-modal {
        padding: 0.75rem 0.75rem;
        border-radius: 10px;
    }

    .custom-modal-header {
        font-size: 1rem;
        margin-bottom: 0.625rem;
    }

    .logo {
        width: 90px;
        margin-bottom: 4px;
    }

    label {
        font-size: 10.5px;
        margin-bottom: 3px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        font-size: 11.5px;
        padding: 6px;
        margin-bottom: 10px;
        border-radius: 5px;
    }

    button {
        font-size: 11.5px;
        padding: 6px;
        min-height: 40px;
        border-radius: 5px;
    }

    .btn-secondary {
        min-width: 85px;
    }

    .otp-input {
        font-size: 15px;
        letter-spacing: 1px;
        padding: 7px;
    }

    .countdown-container {
        flex-direction: column;
        gap: 5px;
        padding: 7px;
        border-radius: 7px;
    }

    .countdown-text {
        font-size: 11px;
    }

    #countdown {
        font-size: 0.875rem;
    }

    .resend-btn {
        font-size: 11.5px;
        padding: 6px 9px;
        min-height: 32px;
    }

    .otp-note {
        font-size: 10px;
        padding: 9px;
        margin-top: 9px;
    }

    .expired-message {
        padding: 12px;
        margin: 9px 0;
    }

        .expired-message h4 {
            font-size: 12px;
        }

        .expired-message p {
            font-size: 10.5px;
        }

    .custom-modal-footer {
        margin-top: 10px;
        gap: 5px;
    }

    .alert {
        font-size: 11px;
        padding: 6px;
    }

    .text-danger {
        font-size: 9.5px;
    }

    .spinner {
        width: 12px;
        height: 12px;
        margin-right: 4px;
    }
}

/* Landscape orientation adjustments for phones */
@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        padding: 8px;
        min-height: 100vh;
    }

    .custom-modal {
        padding: 0.875rem 1.25rem;
        max-width: 450px;
    }

    .custom-modal-header {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .logo {
        width: 90px;
        margin-bottom: 4px;
    }

    label {
        margin-bottom: 3px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        padding: 6px;
        margin-bottom: 8px;
        font-size: 12px;
    }

    button {
        padding: 6px;
        min-height: 36px;
        font-size: 12px;
    }

    .countdown-container {
        padding: 6px 10px;
    }

    .otp-note {
        padding: 8px;
        margin-top: 8px;
        font-size: 11px;
    }

    .expired-message {
        padding: 10px;
        margin: 8px 0;
    }

        .expired-message h4 {
            font-size: 13px;
            margin-bottom: 4px;
        }

        .expired-message p {
            font-size: 11px;
            margin: 4px 0;
        }

    .custom-modal-footer {
        margin-top: 10px;
        gap: 6px;
    }

    .alert {
        padding: 6px;
        margin-bottom: 0.5rem;
    }
}

/* Short viewport adjustments */
@media (max-height: 600px) {
    .custom-modal {
        margin: 10px 0;
    }

    .logo {
        margin-bottom: 6px;
    }

    .custom-modal-header {
        margin-bottom: 0.625rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        margin-bottom: 10px;
    }

    .otp-note {
        margin-top: 10px;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus-visible,
input:focus-visible,
.resend-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .custom-modal {
        border: 2px solid var(--text-primary);
    }

    button {
        border: 1px solid var(--text-primary);
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        border-width: 2px;
    }

    .alert {
        border-width: 2px;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Can add dark mode styles here if needed */
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    html,
    body {
        background: white;
    }

    .background-overlay {
        display: none;
    }

    .custom-modal {
        box-shadow: none;
        border: 1px solid #ccc;
        max-width: 100%;
    }

    button,
    .resend-btn {
        border: 1px solid #ccc;
    }

    .spinner {
        display: none;
    }
}

/* ========================================
   TOUCH DEVICE OPTIMIZATIONS
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices - increase touch targets */
    button {
        min-height: 48px;
        padding: 12px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"] {
        min-height: 48px;
        padding: 12px;
    }

    .resend-btn {
        min-height: 44px;
        padding: 10px 15px;
    }

    /* Remove hover effects on touch devices */
    button:hover {
        transform: none;
        box-shadow: none;
        background: var(--primary-gradient);
    }

    .resend-btn:hover {
        background-color: transparent;
    }
}

/* ========================================
   UTILITY CLASSES FOR RESPONSIVE DESIGN
   ======================================== */
.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 767px) {
    .hide-mobile {
        display: none;
    }

    .show-mobile {
        display: block;
    }
}
