/* ========================================
   The Pharmacy Clinic - Auth Styles
   Parent CSS for all authentication pages
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ========================================
   Container & Layout
   ======================================== */

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 600px;
}

/* ========================================
   Left Panel
   ======================================== */

.left-panel {
    background: linear-gradient(135deg, #2ec1d4 0%, #1a9db0 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    left: -100px;
}

.left-panel::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -50px;
    right: -50px;
}

.logo-pattern {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.logo-pattern h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.logo-pattern p {
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 350px;
}

.icon-decoration {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    backdrop-filter: blur(10px);
}

.icon-decoration svg {
    width: 40px;
    height: 40px;
    fill: white;
}

/* ========================================
   Right Panel
   ======================================== */

.right-panel {
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

.logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 30px;
    display: block;
}

/* ========================================
   Typography
   ======================================== */

h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 35px;
    line-height: 1.5;
}

/* ========================================
   Alerts & Messages
   ======================================== */

.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.alert li {
    margin-left: 20px;
    margin-bottom: 5px;
}

.alert li:last-child {
    margin-bottom: 0;
}

.text-center {
    text-align: center;
}

/* ========================================
   Form Elements
   ======================================== */

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #fafafa;
    margin-bottom: 16px;
}

.form-control:focus {
    outline: none;
    border-color: #2ec1d4;
    background: white;
    box-shadow: 0 0 0 3px rgba(46, 193, 212, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

/* Remove spinner from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ========================================
   Buttons
   ======================================== */

button[type="submit"] {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #2ec1d4 0%, #1a9db0 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-top: 10px;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(46, 193, 212, 0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    padding: 12px 24px;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-top: 15px;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.3);
}

.btn-secondary:disabled {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   Links
   ======================================== */

.forgot-password {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 25px;
}

.forgot-password a {
    font-size: 14px;
    color: #2ec1d4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #1a9db0;
}

.signup-link {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #64748b;
}

.signup-link a {
    color: #2ec1d4;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: #1a9db0;
}

/* ========================================
   Success State
   ======================================== */

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: scaleIn 0.5s ease;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 968px) {
    .container {
        grid-template-columns: 1fr;
    }

    .left-panel {
        display: none;
    }

    .right-panel {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .container {
        border-radius: 15px;
        min-height: auto;
    }

    .right-panel {
        padding: 30px 20px;
    }

    h1 {
        font-size: 28px;
    }

    .subtitle {
        font-size: 14px;
    }

    .logo {
        max-width: 150px;
        margin-bottom: 25px;
    }

    .form-control {
        padding: 12px 14px;
        font-size: 14px;
    }

    button[type="submit"] {
        padding: 13px;
        font-size: 15px;
    }
}

/* ========================================
   Utility Classes
   ======================================== */

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-3 {
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

/* ========================================
   Loading State
   ======================================== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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