/* PageFlipStudio - Adobe XD Auth Styles */
:root {
    --primary: #6e37e2;
    --primary-hover: #5d28cb;
    --primary-light: rgba(110, 55, 226, 0.12);
    --bg-gradient: linear-gradient(135deg, #f4f1f8 0%, #faf6fb 50%, #fff0f9 100%);
    --card-bg: #ffffff;
    --card-shadow: 0 20px 50px rgba(110, 55, 226, 0.08), 0 4px 15px rgba(0, 0, 0, 0.03);
    --border-color: #e5e7eb;
    --input-bg: #fafbfc;
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-label: #4b5563;
    --error: #dc2626;
    --success: #16a34a;
}

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

body {
    min-height: 100vh;
    background: var(--bg-gradient);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 440px;
    border-radius: 28px;
    padding: 44px 40px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Brand Logo */
.brand-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
}

.brand-badge {
    background: var(--primary);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(110, 55, 226, 0.25);
    flex-shrink: 0;
}

.brand-badge svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.brand-pageflip {
    color: var(--primary);
}

.brand-studio {
    background: linear-gradient(90deg, #9333ea, #d946ef, #e11d48);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Headings */
.auth-header {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 28px;
}

.auth-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-label);
    margin-bottom: 6px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon svg {
    width: 18px;
    height: 18px;
}

.form-control {
    width: 100%;
    height: 48px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0 14px 0 44px;
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    transition: all 0.15s ease;
}

.form-control::placeholder {
    color: #9ca3af;
    font-size: 13.5px;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background-color: #ffffff;
}

/* Options (Remember me & Forgot PW) */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    margin-bottom: 24px;
    font-size: 12.5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-label);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

.link-forgot {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.link-forgot:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    height: 48px;
    background: var(--primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
    box-shadow: 0 4px 14px rgba(110, 55, 226, 0.28);
}

.btn-submit svg {
    width: 18px;
    height: 18px;
    transition: transform 0.15s ease;
}

.btn-submit:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 18px rgba(110, 55, 226, 0.38);
}

.btn-submit:hover svg {
    transform: translateX(2px);
}

.btn-submit:active {
    transform: scale(0.99);
}

/* Footer Link */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13.5px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alert Notification */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.alert-error {
    background-color: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

/* Demo Credentials Box */
.demo-box {
    margin-top: 22px;
    padding: 10px 12px;
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    font-size: 11.5px;
    color: #64748b;
    text-align: center;
}

.demo-box strong {
    color: var(--text-main);
}

/* Language Selector */
.auth-top-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.auth-lang-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 6px 28px 6px 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    outline: none;
    transition: all 0.15s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.auth-lang-select:hover, .auth-lang-select:focus {
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .input-icon {
    left: auto;
    right: 14px;
}

[dir="rtl"] .form-control {
    padding: 0 44px 0 14px;
}

[dir="rtl"] .auth-top-bar {
    justify-content: center;
}

[dir="rtl"] .auth-lang-select {
    padding: 6px 12px 6px 28px;
    background-position: left 10px center;
}

[dir="rtl"] .btn-submit svg {
    transform: scaleX(-1);
}

[dir="rtl"] .btn-submit:hover svg {
    transform: scaleX(-1) translateX(-2px);
}

[dir="rtl"] .auth-footer a {
    margin-left: 0;
    margin-right: 4px;
}

