/* Container styling */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5%;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Title styling */
.headerText {
    margin: 0;
    font-size: 1.5rem;
    color: #2d3436;
    font-weight: 700;
    flex-grow: 1; /* Pushes buttons to the right */
}

/* User name styling */
#userName {
    margin: 0 20px;
    font-size: 1rem;
    color: #636e72;
    font-weight: 400;
}

/* Button styling */
.headerButton {
    background-color: #6c5ce7; /* Elegant Purple */
    color: white;
    border: none;
    padding: 10px 20px;
    margin-left: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.headerButton:hover {
    background-color: #a29bfe;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 92, 231, 0.2);
}

/* Ensure links don't have underlines */
.header a {
    text-decoration: none;
}

/* Form alignment for Logout */
.header form {
    display: inline;
    margin: 0;
}

/* Base Card Styling */
.closedCard, .openedCard {
    background: #ffffff;
    border-radius: 12px;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #e1e8ed;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

/* Hover effect for the closed state */
.closedCard:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Expanded State Elevation */
.openedCard {
    flex-direction: column;
    box-shadow: 0 12px 30px rgba(108, 92, 231, 0.15);
    border-color: #6c5ce7;
}

/* The "Head" container (Button + Name) */
.closedCard div, .openedCard div {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* The Expand/Collapse Button */
.closedCard button, .openedCard button {
    background: #f1f2f6;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.closedCard button:hover, .openedCard button:hover {
    background: #6c5ce7;
    color: white;
}

/* Project Name Label */
.closedCard label:first-of-type,
.openedCard label:first-of-type {
    font-weight: 700;
    font-size: 1.2rem;
    color: #2d3436;
    cursor: pointer;
}

.closedCard label:first-of-type:hover {
    color: #6c5ce7;
    text-decoration: underline;
}

/* Resume/Description Text */
.closedCard label:last-of-type,
.openedCard label:last-of-type {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #636e72;
    display: block;
    transition: opacity 0.3s ease;
}



/* Container for the Admin buttons */
.adminListe {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Styling the Admin links/buttons */
.adminListe a {
    text-decoration: none;
    flex: 1;
    max-width: 300px;
}

.adminListe button {
    width: 100%;
    padding: 30px 20px;
    background-color: #ffffff;
    color: #2d3436;
    border: 2px solid #e1e8ed;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Hover effects for Admin cards */
.adminListe button:hover {
    border-color: #6c5ce7;
    color: #6c5ce7;
    background-color: #f8f7ff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.1);
}

/* Styling for the "You aren't supposed to be here" message */
body > b, .error-message {
    display: block;
    text-align: center;
    margin-top: 100px;
    font-family: 'Segoe UI', sans-serif;
    color: #d63031;
    font-size: 1.2rem;
}

/* Container for the scrollable list of users */
#liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Page Title Styling */
h1 {
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    color: #2d3436;
    margin-top: 30px;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Target the Custom Element 'auth-card' */
auth-card {
    display: block; /* Custom elements are inline by default */
    background: #ffffff;
    border-left: 5px solid #ff9f43; /* Orange "Pending" accent */
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

auth-card:hover {
    transform: scale(1.02);
}

/* Styling the 'AuthButton' custom element */
auth-button {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
}

/* If your AuthButton class creates a button internally */
auth-button button {
    background: #2ecc71; /* Success Green */
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3);
    transition: all 0.3s ease;
}

auth-button button:hover {
    background: #27ae60;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(46, 204, 113, 0.4);
}

/* Position the custom element */
auth-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    cursor: pointer;
}

/* Style the internal label as the actual button */
auth-button label {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

/* Hover & Active States */
auth-button:hover label {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(46, 204, 113, 0.4);
    filter: brightness(1.1);
}

auth-button:active label {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(46, 204, 113, 0.2);
}

/* Adding a checkmark icon via CSS before the text */
auth-button label::before {
    content: '✓';
    font-weight: bold;
    font-size: 1.1rem;
}

/* Custom Element Container */
auth-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    gap: 15px;
}

/* The Email Label */
auth-card label {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    color: #2d3436;
    word-break: break-all; /* Prevents long emails from breaking the layout */
    font-size: 1rem;
}

/* The Toggle Button Base */
auth-card button {
    cursor: pointer;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    width: 100%;
}

/* State: Not Approved (Default) */
auth-card button:not(.approved) {
    background-color: #fff5f5;
    color: #eb4d4b;
    border: 1px solid #fab1a0;
}

auth-card button:not(.approved):hover {
    background-color: #eb4d4b;
    color: white;
}

/* State: Approved (We will add this class via TS) */
auth-card button.approved {
    background-color: #ebffef;
    color: #20bf6b;
    border: 1px solid #20bf6b;
}

auth-card button.approved:hover {
    background-color: #20bf6b;
    color: white;
}

/* Visual change for the whole card when approved */
auth-card:has(button.approved) {
    border-color: #20bf6b;
    background-color: #f0fff4;
}

/* Container styling for the specific login form */
.logform {
    background: #ffffff;
    max-width: 400px;
    margin: 60px auto;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Label styling */
.logform label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
}

/* Input fields (Email & Password) */
.logform input[type="email"],
.logform input[type="password"],
.logform input[type="text"]{
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 24px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    color: #2d3748;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

/* Focus state for inputs */
.logform input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
}

/* Submit button styling */
.logform input[type="submit"] {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

/* Button hover effects */
.logform input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.logform input[type="submit"]:active {
    transform: translateY(0);
}

/* Internal link styling */
.logform a {
    color: #6c5ce7;
    text-decoration: none;
    font-weight: 600;
}

.logform a:hover {
    text-decoration: underline;
}