/**
 * Smartway - Touristic Services Application
 * Mobile-First Stylesheet
 */

/* CSS Variables - Nero Luxury Suites Brand Colors */
:root {
    --primary-color: #1a1a1a;
    --primary-hover: #000000;
    --primary-light: #2a2a2a;
    --secondary-color: #B49367;
    --secondary-hover: #c9a77a;
    --secondary-light: #d4b896;
    --gold: #B49367;
    --gold-light: #c9a77a;
    --dark-bg: #1a1a1a;
    --darker-bg: #0f0f0f;
    --accent-color: #B49367;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --text-color: #ffffff;
    --text-muted: #ffffff;
    --text-light: #ffffff;
    --bg-light: #2a2a2a;
    --bg-white: #1a1a1a;
    --border-color: #333333;
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--dark-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Subtle dark gradient overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center top, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%);
    pointer-events: none;
    z-index: 0;
}

@keyframes backgroundMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -30px); }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Auth Card - Dark Theme */
.auth-card {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: var(--border-radius);
    box-shadow: none;
    padding: 36px 28px;
    animation: fadeInUp 0.5s ease;
    border: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 700;
    color: var(--gold);
    text-decoration: none;
    margin-bottom: 12px;
    transition: var(--transition);
}

.auth-logo:hover {
    transform: scale(1.02);
}

/* Logo Image Styles */
.logo-image {
    width: 72%;
    max-width: 240px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-bg);
    font-weight: 700;
    font-size: 22px;
    box-shadow: var(--shadow-md);
}

.auth-subtitle {
    color: var(--gold);
    font-size: 13px;
    margin-top: 16px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px; /* Prevents iOS zoom */
    border: 1px solid var(--gold);
    border-radius: 4px;
    transition: var(--transition);
    font-family: inherit;
    background: transparent;
    color: #ffffff;
}

.form-control::placeholder {
    color: #666666;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-light);
    box-shadow: 0 0 0 2px rgba(180, 147, 103, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.form-control.error {
    border-color: var(--danger-color);
    animation: shake 0.3s ease;
}

.form-control.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.form-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    color: #ffffff;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--gold);
}

.checkbox-container a {
    color: var(--gold);
}

/* Form Row */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: -4px;
}

/* Buttons */
.btn {
    padding: 16px 28px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gold);
    color: #1a1a1a;
    box-shadow: none;
}

.btn-primary:hover:not(:disabled) {
    background: var(--gold-light);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    text-decoration: none;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: rgba(180, 147, 103, 0.15);
    transform: translateY(-1px);
}

.btn-guest {
    background: linear-gradient(135deg, rgba(180, 147, 103, 0.08) 0%, rgba(180, 147, 103, 0.03) 100%);
    border: 1px solid rgba(180, 147, 103, 0.4);
    color: var(--gold);
    text-decoration: none;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-guest::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(180, 147, 103, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-guest:hover {
    background: linear-gradient(135deg, rgba(180, 147, 103, 0.15) 0%, rgba(180, 147, 103, 0.08) 100%);
    border-color: rgba(180, 147, 103, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(180, 147, 103, 0.15);
}

.btn-guest:hover::before {
    left: 100%;
}

.btn-guest:active {
    transform: translateY(0);
}

.btn-guest svg {
    width: 18px;
    height: 18px;
    stroke: var(--gold);
    stroke-width: 2;
    flex-shrink: 0;
}

.guest-divider {
    display: flex;
    align-items: center;
    margin: 28px 0 24px;
    color: #666666;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.guest-divider::before,
.guest-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.guest-divider span {
    padding: 0 16px;
}

.btn-link {
    color: var(--gold);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.btn-link:hover {
    border-bottom-color: var(--gold);
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-info {
    background: rgba(180, 147, 103, 0.15);
    color: var(--gold);
    border: 1px solid rgba(180, 147, 103, 0.3);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #333333;
    font-size: 13px;
    color: #ffffff;
}

.auth-footer p {
    margin: 8px 0;
}

/* Powered By Footer */
.powered-by {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    font-size: 12px;
    color: var(--gold);
    letter-spacing: 1px;
}

.powered-by span {
    color: #ffffff;
}

/* Auth Separator */
.auth-separator {
    height: 1px;
    background: var(--border-color);
    margin: 24px 0;
}

/* Loading State */
.auth-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

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

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    display: none;
}

.password-strength.active {
    display: block;
}

.strength-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-fill.weak {
    width: 33%;
    background: var(--danger-color);
}

.strength-fill.medium {
    width: 66%;
    background: var(--warning-color);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success-color);
}

.strength-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .auth-card {
        padding: 28px 20px;
    }

    .auth-logo {
        font-size: 24px;
    }


    .logo-icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .form-control {
        padding: 14px 16px;
    }

    .btn {
        padding: 14px 24px;
    }

    .alert {
        font-size: 13px;
    }
}

/* Larger screens */
@media (min-width: 768px) {
    .auth-card {
        padding: 44px 36px;
    }

    .auth-logo {
        font-size: 28px;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
    }

    .form-control {
        min-height: 48px;
    }

    .checkbox-container input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Improve readability on small screens */
@media (max-height: 700px) {
    body {
        align-items: flex-start;
        padding-top: 40px;
    }
}
