/* ============================================
   Authentication Layout – Modern & Responsive
   StarPro Vision Technology Corporation
   ============================================ */

:root {
    --primary-color: #28a745;
    --primary-hover: #218838;
    --primary-light: #d4edda;
    --secondary-color: #20c997;
    --accent-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    --danger-color: #e53e3e;
    --success-color: #28a745;
    --warning-color: #ecc94b;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Two-Panel Layout
   ============================================ */

.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ── Left Branding Panel ── */
.auth-side-panel {
    flex: 0 0 480px;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

/* Decorative background circles */
.auth-side-panel::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    top: -180px;
    right: -140px;
    pointer-events: none;
}

.auth-side-panel::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    bottom: -100px;
    left: -80px;
    pointer-events: none;
}

.auth-side-content {
    position: relative;
    z-index: 1;
}

.logo-section {
    margin-bottom: 48px;
}

.logo-section .auth-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.15);
    padding: 8px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.logo-section h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.logo-section .company-name {
    font-size: 14px;
    opacity: 0.85;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Feature list */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    animation: fadeSlideUp 0.5s ease forwards;
    opacity: 0;
}

.feature-item:nth-child(1) { animation-delay: 0.15s; }
.feature-item:nth-child(2) { animation-delay: 0.30s; }
.feature-item:nth-child(3) { animation-delay: 0.45s; }

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.feature-item > i {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    font-size: 18px;
    backdrop-filter: blur(4px);
}

.feature-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.5;
}

/* ── Right Form Panel ── */
.auth-content-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px;
    background: #fff;
    overflow-y: auto;
}

.auth-content {
    width: 100%;
    max-width: 440px;
    animation: fadeIn 0.45s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-footer {
    margin-top: 40px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-footer .footer-links {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.auth-footer .footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-size: 13px;
}

.auth-footer .footer-links a:hover {
    color: var(--primary-color);
}

/* ============================================
   Auth Card (Login / Register)
   ============================================ */

.auth-card {
    width: 100%;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ============================================
   Form Styles
   ============================================ */

.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group label i {
    font-size: 13px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-primary);
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(40,167,69,0.12);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Row layout for side-by-side fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Password toggle */
.password-input {
    position: relative;
}

.password-input .form-control {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    font-size: 16px;
    transition: var(--transition);
    line-height: 1;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Form Options (remember + forgot) */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
    border-radius: 4px;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    line-height: 1.4;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

.btn-primary:disabled {
    background: #94d3a2;
    border-color: #94d3a2;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Loading spinner */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Auth Divider
   ============================================ */

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

/* ============================================
   Auth Links
   ============================================ */

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ============================================
   Alert Messages
   ============================================ */

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert i { font-size: 18px; flex-shrink: 0; }

.alert-success {
    background: var(--primary-light);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

.alert-warning {
    background: #fffff0;
    color: #975a16;
    border: 1px solid #fefcbf;
}

.alert-info {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
}

/* ============================================
   Status Pages (verified / failed)
   ============================================ */

.status-container {
    text-align: center;
    padding: 40px 20px;
}

.status-icon {
    font-size: 72px;
    margin-bottom: 24px;
}

.status-icon.success { color: var(--success-color); }
.status-icon.error   { color: var(--danger-color); }

.status-container h2 {
    font-size: 26px;
    margin-bottom: 12px;
}

.status-container p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.6;
}

/* ============================================
   Responsive – Tablet
   ============================================ */

@media (max-width: 1024px) {
    .auth-side-panel {
        flex: 0 0 380px;
        padding: 48px 36px;
    }

    .logo-section h1 { font-size: 24px; }
    .feature-item h3 { font-size: 15px; }
}

/* ============================================
   Responsive – Small Tablet / Large Phone
   ============================================ */

@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-side-panel {
        flex: none;
        padding: 36px 28px;
    }

    .logo-section {
        margin-bottom: 28px;
        text-align: center;
    }

    .logo-section .auth-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .logo-section h1 { font-size: 22px; }

    .feature-list {
        display: none;
    }

    .auth-content-panel {
        padding: 36px 24px;
    }

    .auth-header h2 { font-size: 24px; }
}

/* ============================================
   Responsive – Phone
   ============================================ */

@media (max-width: 480px) {
    .auth-side-panel {
        padding: 28px 20px;
    }

    .logo-section .auth-logo {
        width: 56px;
        height: 56px;
    }

    .logo-section h1 { font-size: 20px; }

    .auth-content-panel {
        padding: 28px 18px;
    }

    .auth-header h2 { font-size: 22px; }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .auth-footer .footer-links {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================
   Utilities
   ============================================ */

.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-small   { font-size: 14px; }
.fw-normal    { font-weight: 400; }
.mt-3         { margin-top: 20px; }
.mt-4         { margin-top: 30px; }
.mb-0         { margin-bottom: 0; }
.d-flex       { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center      { align-items: center; }
