/* ============================================
   MODERN LOGIN CSS - MATCHING DASHBOARD THEME
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #0a1628 0%, #1a2f3f 50%, #0d1b2a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Background Orbs (Matching Dashboard) */
.login-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="1" fill="%2306b6d4" opacity="0.6"/></svg>') repeat;
    animation: animateStars 50s linear infinite;
}

.stars2 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="0.5" fill="%2310b981" opacity="0.5"/></svg>') repeat;
    animation: animateStars 100s linear infinite;
}

.stars3 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="1.5" fill="%220ea5e9" opacity="0.4"/></svg>') repeat;
    animation: animateStars 150s linear infinite;
}

@keyframes animateStars {
    from { transform: translateY(0); }
    to { transform: translateY(-2000px); }
}

/* Floating Gradient Orbs */
.floating-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 25s infinite ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0ea5e9 100%);
    top: -250px;
    right: -250px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #14b8a6 100%);
    bottom: -200px;
    left: -200px;
    animation-delay: 8s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #fb923c 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 16s;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) scale(1) rotate(0deg); 
        opacity: 0.4;
    }
    25% { 
        transform: translate(60px, -40px) scale(1.15) rotate(90deg); 
        opacity: 0.5;
    }
    50% { 
        transform: translate(-30px, 40px) scale(0.95) rotate(180deg); 
        opacity: 0.35;
    }
    75% { 
        transform: translate(50px, 30px) scale(1.1) rotate(270deg); 
        opacity: 0.45;
    }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 24px;
}

/* Login Box */
.login-box {
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(35px) saturate(180%);
    -webkit-backdrop-filter: blur(35px) saturate(180%);
    border-radius: 28px;
    padding: 44px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(6, 182, 212, 0.15);
    border: 2px solid rgba(6, 182, 212, 0.2);
    animation: slideUp 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 44px;
}

.logo-icon {
    font-size: 72px;
    margin-bottom: 16px;
    animation: pulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.5));
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.5));
    }
    50% { 
        transform: scale(1.08);
        filter: drop-shadow(0 0 25px rgba(6, 182, 212, 0.8));
    }
}

.logo-text {
    background: linear-gradient(135deg, #06b6d4 0%, #10b981 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    position: relative;
}

.logo-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Input Groups */
.input-group {
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 16px 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(6, 182, 212, 0.2);
    border-radius: 16px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.input-group input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #06b6d4;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3), 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.input-group input::placeholder {
    color: transparent;
}

.input-group label {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.65);
    font-size: 16px;
    font-weight: 500;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: -12px;
    left: 18px;
    font-size: 13px;
    font-weight: 600;
    color: #22d3ee;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(6, 182, 212, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #06b6d4, #10b981, #0ea5e9);
    border-radius: 0 0 16px 16px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.input-group input:focus ~ .input-highlight {
    width: 100%;
}

/* Login Button */
.login-btn {
    position: relative;
    padding: 18px 32px;
    background: linear-gradient(135deg, #06b6d4 0%, #10b981 50%, #0ea5e9 100%);
    border: none;
    border-radius: 18px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.5);
    z-index: 1;
}

.login-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.7);
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #0ea5e9 100%);
}

.login-btn:active {
    transform: translateY(-2px);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

.login-btn:hover .btn-shine {
    left: 100%;
}

.login-btn span {
    position: relative;
    z-index: 1;
}

/* Error Message */
.error-message {
    padding: 16px;
    background: rgba(239, 68, 68, 0.25);
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: 14px;
    color: #fecaca;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    display: none;
    animation: shake 0.5s ease;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* Telegram Link */
.telegram-link {
    margin-top: 28px;
    text-align: center;
    padding-top: 24px;
    border-top: 2px solid rgba(6, 182, 212, 0.2);
}

.telegram-link p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.telegram-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
    position: relative;
    overflow: hidden;
}

.telegram-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.telegram-btn:hover::before {
    left: 100%;
}

.telegram-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 136, 204, 0.6);
    background: linear-gradient(135deg, #0099dd 0%, #0077bb 100%);
}

.telegram-btn i {
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.telegram-btn span {
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 640px) {
    .login-container {
        padding: 20px;
        max-width: 100%;
    }
    
    .login-box {
        padding: 36px 28px;
        border-radius: 24px;
    }
    
    .logo-icon {
        font-size: 60px;
    }
    
    .logo-text {
        font-size: 30px;
    }
    
    .logo-subtitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 32px 24px;
        border-radius: 22px;
    }
    
    .logo-text {
        font-size: 28px;
    }
    
    .logo-icon {
        font-size: 56px;
    }
    
    .logo-subtitle {
        font-size: 13px;
    }
    
    .input-group input {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .login-btn {
        padding: 16px 28px;
        font-size: 16px;
    }
    
    .telegram-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .login-box {
        padding: 28px 20px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .logo-icon {
        font-size: 48px;
    }
}
