:root {
    --primary: #6C63FF;
    --primary-dark: #554FD8;
    --secondary: #FF6584;
    --success: #36D399;
    --warning: #FFB347;
    --danger: #FF6B6B;
    --dark: #1A1A2E;
    --light: #F8F9FF;
    --private-gradient: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
    --public-gradient: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
    --shadow: 0 20px 40px rgba(108, 99, 255, 0.15);
    --shadow-lg: 0 30px 60px rgba(108, 99, 255, 0.25);
    --radius: 20px;
    --transition: all 0.4s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--light) 0%, rgba(108, 99, 255, 0.1) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

/* Toast Container */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-notification {
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0;
    margin-bottom: 10px;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

.toast-icon {
    font-size: 24px;
    margin-right: 15px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0 5px;
}

.toast-close:hover {
    color: #333;
}

.toast-progress {
    height: 3px;
    background: #f0f0f0;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    animation: progress 5s linear;
}

.toast-success .toast-progress-bar {
    background: #28a745;
}

.toast-error .toast-progress-bar {
    background: #dc3545;
}

.toast-info .toast-progress-bar {
    background: #17a2b8;
}

.toast-warning .toast-progress-bar {
    background: #ffc107;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Main Container */
.admin-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Toggle Slider for Admin Type */
.admin-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.admin-toggle {
    background: white;
    border-radius: 50px;
    padding: 8px;
    box-shadow: var(--shadow);
    display: inline-flex;
    position: relative;
    width: 450px;
}

.toggle-option {
    flex: 1;
    padding: 12px 24px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    border-radius: 40px;
    transition: var(--transition);
    z-index: 2;
    position: relative;
    color: #666;
}

.toggle-option.active {
    color: white;
}

.toggle-slider {
    position: absolute;
    top: 8px;
    bottom: 8px;
    width: calc(50% - 8px);
    background: var(--private-gradient);
    border-radius: 40px;
    transition: var(--transition);
    z-index: 1;
}

.toggle-slider.public {
    transform: translateX(calc(100% + 8px));
}

/* Main Container */
.admin-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    min-height: 600px;
}

/* Left Side - Description */
.description-side {
    flex: 1;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(255, 101, 132, 0.05));
}

.description-content {
    position: relative;
    z-index: 2;
}

.description-icon {
    font-size: 4rem;
    margin-bottom: 25px;
    display: inline-block;
    color: var(--primary);
}

.description-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    line-height: 1.2;
    background: var(--private-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description-text {
    color: #555;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
}

.feature-text {
    flex: 1;
    font-weight: 500;
}

.feature-text small {
    display: block;
    color: #888;
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 3px;
}

/* Stats Section */
.admin-stats {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

/* Decorative Elements */
.description-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.1;
    pointer-events: none;
    background: radial-gradient(circle at 20% 50%, var(--primary) 0%, transparent 50%);
}

/* Right Side - Login Form */
.form-side {
    flex: 1;
    padding: 50px 40px;
    background: white;
    position: relative;
}

.form-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--private-gradient);
    transition: var(--transition);
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.form-header .logo {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 900;
    transition: var(--transition);
    display: inline-block;
}

.form-header .logo i {
    color: var(--primary);
    margin-right: 5px;
}

/* Keep gradient on hover for effect */
.form-header .logo:hover {
    background: var(--private-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-2px);
}

.form-header h2 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.form-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Form Elements */
.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 1rem;
}

.input-group {
    margin-bottom: 20px;
    transition: var(--transition);
}

.input-group:focus-within {
    transform: translateY(-2px);
}

.form-control {
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.2);
}

.input-group-text {
    background: var(--private-gradient);
    color: white;
    border: none;
    border-radius: 12px 0 0 12px;
    padding: 0 20px;
    min-width: 55px;
    justify-content: center;
    transition: var(--transition);
}

/* Admin Type Badge */
.admin-type-badge {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.private-badge {
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
}

.public-badge {
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
}

/* Buttons */
.btn-login {
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
    width: 100%;
    color: white;
    margin-top: 10px;
    background: var(--private-gradient);
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Checkbox and Links */
.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    color: #666;
    font-weight: 500;
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Quick Access Buttons */
.quick-access {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.quick-btn {
    flex: 1;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
    transition: var(--transition);
    cursor: pointer;
}

.quick-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.quick-btn i {
    margin-right: 5px;
    color: var(--primary);
}

/* Create Room Link */
.create-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.create-link a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.create-link a:hover {
    transform: translateX(5px);
    color: var(--secondary);
}

/* Back to Home */
.back-home {
    text-align: center;
    margin-top: 20px;
}

.back-home a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.back-home a:hover {
    color: var(--secondary);
    transform: translateX(-5px);
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 992px) {
    .admin-container {
        flex-direction: column;
        min-height: auto;
    }

    .description-side {
        padding: 40px 30px;
    }

    .form-side {
        padding: 40px 30px;
    }

    .admin-toggle {
        width: 400px;
    }
}

@media (max-width: 768px) {
    .admin-container {
        margin: 20px;
    }

    .admin-toggle {
        width: 350px;
    }

    .toggle-option {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .description-title {
        font-size: 1.8rem;
    }

    .admin-stats {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }

    .admin-toggle {
        width: 100%;
    }

    .toggle-option {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    .description-side {
        padding: 30px 20px;
    }

    .form-side {
        padding: 30px 20px;
    }

    .description-title {
        font-size: 1.6rem;
    }

    .description-text {
        font-size: 1rem;
    }

    .quick-access {
        flex-direction: column;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-login:active {
        transform: scale(0.98);
    }

    .quick-btn:active {
        transform: scale(0.95);
    }
}

@media (max-width: 400px) {
    .admin-container {
        margin: 5px;
    }
}

/* Additional styles for better UX */
.toast-notification {
    animation: slideIn 0.3s ease-out;
    transition: all 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-control:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}