/* General Body and Font Imports */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    color: #333;
    overflow: hidden;
}

/* Main Page Container with Image Background and Overlay */
.login-page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #1a1a1a;
    color: #e0e0e0;
    position: relative;
    padding-bottom: 50px;
}

/* Pseudo-element for the background image and overlay */
.login-page-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* The first background is a semi-transparent gradient, the second is your image */
    background-image: linear-gradient(to right, rgba(26, 26, 26, 0.8), rgba(26, 26, 26, 0.5)), url('images/login.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    z-index: 0;
}

/* Header with Logo */
.login-header {
    width: 100%;
    padding: 20px 40px;
    position: relative;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.logo-container .logo {
    height: 35px;
}

.logo-container .site-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}

/* Main Content Wrapper (Welcome text and form card) */
.login-content-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 80px;
    position: relative;
    z-index: 1;
}

/* Welcome Text Section */
.welcome-text {
    max-width: 500px;
    padding-right: 40px;
}

.welcome-text h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.1;
}

.welcome-text p {
    font-size: 1.3rem;
    color: #bbb;
    line-height: 1.5;
}

/* Form Card (The White Container) */
.form-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 50px; /* This sets the inner spacing */
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto !important; /* Allow it to shrink to the content size */
    min-height: unset !important;
}

.form-box {
    opacity: 0;
    visibility: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: opacity 0.4s ease-in-out;
    position: absolute; /* keep absolute for overlap */
    top: 0; 
    left: 0;
}

.form-box.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Natural spacing between input groups */
}

/* Form Titles and Subtitles */
.form-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    text-align: center;
}

.form-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

/* Input Fields */
.input-group {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}


.input-group i {
    position: absolute;
   left: 18px; 
    /* This centers the icon vertically inside the 45px high input box */
   bottom: 6px;
    transform: translateY(-50%);
    color: #9752eb;
    font-size: 16px; /* Slightly smaller looks more elegant */
   z-index: 10;
   pointer-events: none;
}
.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #bfbfc6; /* FIX: Changed #muted to a real hex code */
    font-weight: 500;
    text-align: left;
}


/* 1. Prevent inputs from ballooning in size */
.input-group input {
   width: 100%;
    padding: 12px 15px 12px 48px !important; /* Increased left padding to 48px */
    margin-top: 8px;
  background: #f8f9fa !important;
   border: 1px solid #ddd !important;
    border-radius: 8px;
    color: #333 !important;
    font-size: 14px;
    box-sizing: border-box; /* IMPORTANT: keeps padding inside the width */
    display: block; /* Ensures it doesn't fight flexbox for width */
}

.input-group input:focus {
    outline: none;
    border-color: #9752eb;
    box-shadow: 0 0 0 3px rgba(151, 82, 235, 0.2);
}

/* Buttons */
.btn {
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: #9752eb;
    color: #fff;
    font-size: 1.1em;
}

.btn-primary:hover {
    background-color: #7942c8;
    transform: translateY(-2px);
}

.btn-full-width {
    width: 100%;
}

/* Toggle Link */
.form-toggle-link {
    margin-top: 30px;
    font-size: 0.95em;
    color: #666;
    text-align: center;
}

.form-toggle-link a {
    color: #9752eb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-toggle-link a:hover {
    color: #7942c8;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .login-content-wrapper {
        padding: 0 40px;
    }
    .welcome-text h1 {
        font-size: 2.5rem;
    }
    .welcome-text p {
        font-size: 1rem;
    }
    .form-card {
        padding: 40px;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .login-page-container::before {
        background-image: linear-gradient(to right, rgba(26, 26, 26, 0.8), rgba(26, 26, 26, 0.5)), url('images/login.jpg');
        background-size: cover;
        background-position: center;
    }
    .login-content-wrapper {
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px;
        text-align: center;
    }
    .welcome-text {
        max-width: 100%;
        padding-right: 0;
        margin-bottom: 40px;
    }
    .welcome-text h1 {
        font-size: 2rem;
    }
    .welcome-text p {
        font-size: 0.95rem;
    }
    .form-card {
        width: 90%;
        max-width: none;
        padding: 30px;
    }
    .login-header {
        text-align: center;
        padding: 20px;
    }
    .logo-container {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .login-header {
        padding: 15px;
    }
    .login-content-wrapper {
        padding: 15px;
    }
    .welcome-text h1 {
        font-size: 1.8rem;
    }
    .welcome-text p {
        font-size: 0.9rem;
    }
    .form-card {
        padding: 25px;
    }
    .form-title {
        font-size: 1.8rem;
    }
}
/* ==========================================================================
   MOBILE TOUCH OPTIMIZATION GATEWAY
   ========================================================================== */
@media (max-width: 768px) {
    /* Prevent the layout from collapsing on narrow screens */
    .dashboard-layout {
        grid-template-columns: 1fr !important;
        padding: 12px !important;
        gap: 16px !important;
    }

    /* Expand button touch zones to meet standard accessibility guidelines (minimum 44px) */
    button, 
    .instagram-post-card,
    .nav-links a {
        min-height: 44px !important;
        padding: 12px !important;
    }

    /* Make the calendar grid easily scrollable on mobile screens */
    .calendar-grid {
        overflow-x: auto !important;
        display: block !important;
        white-space: nowrap !important;
    }
}