/**
 * NOGO POINT OF SALE SYSTEM
 * Premium Compact Login CSS
 * 
 * @author System Administrator
 * @version 2.0.0
 */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0ea5e9;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --border: #e2e8f0;
    
    --gradient-primary: linear-gradient(145deg, #2563eb, #1e40af);
    --gradient-accent: linear-gradient(145deg, #8b5cf6, #6d28d9);
    --gradient-dark: linear-gradient(145deg, #0f172a, #1e293b);
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.05);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.1);
    --shadow-inner: inset 0 2px 4px 0 rgba(0,0,0,0.02);
    
    --blur-bg: blur(20px);
    --border-light: 1px solid rgba(255,255,255,0.1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background: var(--darker);
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(125deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.2;
    animation: float 20s infinite;
}

.shape-1 {
    top: 10%;
    right: 5%;
    width: 300px;
    height: 300px;
    background: var(--primary);
    animation-delay: 0s;
}

.shape-2 {
    bottom: 10%;
    left: 5%;
    width: 400px;
    height: 400px;
    background: var(--accent);
    animation-delay: -5s;
}

.shape-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: var(--secondary);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -20px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 20px) scale(1.05); }
}

/* Auth Card - Compact Size */
.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: var(--blur-bg);
    border-radius: 28px;
    box-shadow: var(--shadow-2xl);
    border: var(--border-light);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-height: 580px; /* Reduced height */
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.3);
}

/* Brand Panel - Compact */
.brand-panel {
    background: var(--gradient-dark);
    padding: 2rem 1.5rem;
    height: 100%;
    min-height: 500px; /* Reduced height */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brand-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.brand-logo-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: var(--blur-bg);
    border: var(--border-light);
}

.brand-logo {
    max-width: 40px;
    max-height: 40px;
}

.brand-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Compact Features */
.compact-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-chip {
    background: rgba(255,255,255,0.08);
    border-radius: 30px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    color: white;
    display: inline-flex;
    align-items: center;
    backdrop-filter: var(--blur-bg);
    border: var(--border-light);
    transition: all 0.2s ease;
}

.feature-chip:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

/* Business Mini */
.business-mini {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.business-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.text-white-75 {
    color: rgba(255,255,255,0.75);
}

.business-contact {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* Form Panel - Compact */
.form-panel {
    padding: 2rem 2rem;
    background: white;
    min-height: 500px; /* Reduced height */
    display: flex;
    align-items: center;
}

.form-container {
    width: 100%;
    max-width: 320px; /* Narrower form */
    margin: 0 auto;
}

/* Form Groups */
.form-group {
    position: relative;
}

.input-group {
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid var(--border);
    transition: all 0.2s ease;
    background: white;
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group-text {
    border: none;
    background: white;
    color: var(--gray);
    padding: 0.75rem 1rem;
}

.input-group .form-control {
    border: none;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    background: transparent;
}

.input-group .form-control:focus {
    box-shadow: none;
    background: transparent;
}

.input-group .form-control::placeholder {
    color: var(--gray-light);
    font-size: 0.9rem;
}

/* Password Toggle */
#togglePassword {
    cursor: pointer;
    transition: color 0.2s ease;
}

#togglePassword:hover {
    color: var(--primary) !important;
}

/* Form Check */
.form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0.15rem;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    color: var(--gray);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Login Button */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.3px;
    border-radius: 14px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px -2px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Loading State */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-primary.loading .btn-text {
    opacity: 0;
}

.btn-primary.loading .spinner-border {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Demo Credentials */
.demo-credentials {
    background: var(--light);
    padding: 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Security Badge */
.security-badge .badge {
    background: var(--light) !important;
    color: var(--gray) !important;
    font-weight: 500;
    font-size: 0.75rem;
    border: 1px solid var(--border);
}

/* Flash Messages */
.alert {
    border-radius: 14px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fed7aa;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Responsive */
@media (max-width: 991.98px) {
    .auth-card {
        max-height: none;
    }
    
    .form-panel {
        min-height: auto;
        padding: 2rem 1.5rem;
    }
    
    .brand-panel {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .form-panel {
        padding: 1.5rem 1rem;
    }
    
    .form-container {
        max-width: 100%;
    }
    
    .input-group {
        border-radius: 12px;
    }
    
    .btn-primary {
        padding: 0.7rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form validation */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--danger) !important;
}

.invalid-feedback {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: var(--danger);
}

/* Text Utilities */
.text-accent {
    color: var(--accent) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}