﻿/* ============================
   TRANSITPAY - DESIGN SYSTEM
   ============================ */

:root {
    /* Colors */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;

    --success-400: #4ade80;
    --success-500: #22c55e;
    --success-600: #16a34a;

    --warning-400: #fbbf24;
    --warning-500: #f59e0b;
    --warning-600: #d97706;

    --danger-400: #f87171;
    --danger-500: #ef4444;
    --danger-600: #dc2626;

    --info-400: #38bdf8;
    --info-500: #0ea5e9;
    --info-600: #0284c7;

    /* Dark Theme */
    --bg-primary: #0a0a1a;
    --bg-secondary: #111127;
    --bg-card: #16163a;
    --bg-card-hover: #1e1e4a;
    --bg-surface: #1a1a42;
    --bg-input: #12122e;
    --border-color: rgba(99, 102, 241, 0.15);
    --border-color-hover: rgba(99, 102, 241, 0.35);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #a5b4fc;

    /* Glassmorphism */
    --glass-bg: rgba(22, 22, 58, 0.7);
    --glass-border: rgba(99, 102, 241, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================
   RESET & BASE
   ============================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: var(--primary-400);
    text-decoration: none;
}

a:hover {
    color: var(--primary-300);
}

input,
select,
textarea,
button {
    font-family: inherit;
    font-size: inherit;
}

::selection {
    background: var(--primary-500);
    color: white;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-700);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-600);
}

/* ============================
   PAGE SYSTEM
   ============================ */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: flex;
    width: 100%;
}

/* ============================
   LOGIN PAGE
   ============================ */
.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        var(--bg-primary);
}

.login-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatShape 20s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-600);
    top: -100px;
    left: -100px;
    animation-delay: 0s !important;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    bottom: -50px;
    right: -50px;
    animation-delay: -7s !important;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #06b6d4;
    top: 50%;
    left: 60%;
    animation-delay: -14s !important;
}

@keyframes floatShape {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(20px, 10px) scale(1.02);
    }
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--glass-shadow);
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.login-logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a5b4fc, #818cf8, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

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

.phone-prefix {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    z-index: 1;
}

.phone-input-wrapper input {
    padding-left: 2rem;
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

input::placeholder {
    color: var(--text-muted);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================
   BUTTONS
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-500);
    background: rgba(99, 102, 241, 0.08);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
    font-size: 1rem;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-500), var(--danger-600));
    color: white;
}

.login-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 1.5rem;
}

/* ============================
   LOGIN MODE TABS
   ============================ */
.login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: rgba(10, 10, 26, 0.6);
    border-radius: var(--radius-lg);
    padding: 5px;
    margin-bottom: 2rem;
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.login-tab {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: calc(var(--radius-lg) - 3px);
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    position: relative;
}

.login-tab:hover {
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.06);
}

.login-tab.active {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(1.01);
}

/* ============================
   LOGIN PAGE ENHANCEMENTS
   ============================ */
.login-card {
    position: relative;
    z-index: 1;
}

.login-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.1));
    border-radius: calc(var(--radius-xl) + 1px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.login-card:hover::before {
    opacity: 1;
}

.login-card .form-group input:focus,
.login-card .form-group select:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), 0 0 20px rgba(99, 102, 241, 0.06);
}

.login-card .btn-primary {
    padding: 1rem;
    font-size: 1rem;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.login-card .btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}