@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap');

:root {
    --bg-main: #f4f6f9;
    --sidebar-bg: #fff0;
    --card-bg: #fcfefe;
    --primary-purple: #a1102078;
    --accent-teal: #009c22;
    --accent-pink: #f76b8a;
    --border-color: #e5e7eb;
    --text-dark: #020202;
    --text-muted: #151616;
}

* {
    box-sizing: border-box;
    font-family: "Bricolage Grotesque", sans-serif;
    margin: 0;
    padding: 0;
}

body, .auth-page {
    background: var(--bg-main);
    background: url('bg1.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top;
    color: var(--text-dark);
    min-height: 100vh;
}

/* App Layout Grid */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    /* From https://css.glass */
background: rgba(255, 255, 255, 0.2);
border-radius: 16px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
border: 1px solid rgba(255, 255, 255, 0.3);

}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.brand img {
    height: 32px;
    width: auto;
}

.brand span {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.menu-group {
    margin-bottom: 20px;
}

.menu-label {
font-size: 0.72rem;
    font-weight: 700;
    color: #000000;
    background: linear-gradient(45deg, #e8c5ff, transparent);
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 8px;
    padding: 5px 20px;
    border-radius: 10px;
}

.menu-group ul {
    list-style: none;
}

.menu-group li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.menu-group li.active a,
.menu-group li a:hover {
    background: #f3f4f6;
    color: #000;
}

.sidebar-action {
    margin-top: auto;
    margin-bottom: 15px;
}

.btn-activate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-purple);
    color: #ffffff;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;

        background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
    transition: all 0.3s ease;
}

.user-profile-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.avatar, .top-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-teal);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.logout-icon {
    color: var(--text-muted);
    text-decoration: none;
    padding: 5px;
}

.logout-icon:hover {
    color: var(--accent-pink);
}

/* Main Content Wrapper */
.main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
/* From https://css.glass */
background: rgba(255, 255, 255, 0.2);
border-radius: 16px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
border: 1px solid rgba(255, 255, 255, 0.3);
}

.top-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.top-header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text-muted);
}

.top-header-actions i {
    font-size: 1.1rem;
    cursor: pointer;
}

.main-content {
    padding: 30px;
    max-height: 100vh;
    overflow: hidden;
}

.card-box, .table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    /* From https://css.glass */
/* From https://css.glass */
background: rgba(0, 0, 0, 0.51);
border-radius: 16px;
box-shadow: 0 4px 30px #ffffff38;
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
border: 1px solid rgba(0, 0, 0, 0.3);

    background: #fbfbfb8c;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.125);
    border-radius: 20px;
    padding: 40px 32px;

    box-shadow: 0 20px 50px rgb(0 0 0 / 14%), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  
}

/* Form Controls & Tables */
.inline-form {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="url"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    background: transparent;
    color: #000000;
    border-bottom: 1px solid #000000;
}

input[type="url"]::placeholder{
    color: rgb(12, 12, 12);
}

.btn {
    background: var(--primary-purple);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-sm {
    background: linear-gradient(45deg, #24A0ED, #000000);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th, table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

table th {
    background: #f66d3700;
    color: black;
    font-size: 18px;
    text-transform: uppercase;
}

table td {}

table thead {
    background: linear-gradient(45deg, #ffffff, transparent);
}

.badge {
    background: linear-gradient(45deg, #2fbb60, #000);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.table-form {
    display: flex;
    gap: 8px;
}

.success { color: #10b981; margin-bottom: 15px; font-weight: 600; }

/* Responsive Media Queries */
@media (max-width: 900px) {
    .sidebar {
        width: 70px;
        padding: 15px 8px;
    }

    .brand span, 
    .menu-label,  
    .user-info, 
    .btn-activate {
        display: none;
    }

    .main-wrapper {
        margin-left: 70px;
    }

    .inline-form {
        flex-direction: column;
    }
}

/* Authentication Pages */
.auth-page {
    /* background: #eaf6f6; */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    
}

.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 35px 30px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
        /* From https://css.glass */
/* From https://css.glass */
background: rgba(0, 0, 0, 0.51);
border-radius: 16px;
box-shadow: 0 4px 30px #ffffff38;
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
border: 1px solid rgba(0, 0, 0, 0.3);

/* From https://css.glass */
background: rgba(255, 255, 255, 0.2);
border-radius: 16px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.171);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-brand {
    text-align: center;
    margin-bottom: 25px;
}

.auth-brand img {
    height: 45px;
    margin-bottom: 10px;
}

.auth-brand h2 {
    font-size: 1.35rem;
    color: #1f2937;
    font-weight: 700;
}

/* Password Input with Eye Icon Toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #4f46e5;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.88rem;
    color: #6b7280;
}

/* Redirect Page Styles */
.redirect-card {
    text-align: center;
}

.redirect-box {
    padding: 20px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.redirect-box i {
    font-size: 2rem;
}

.redirect-box.warning {
    background-color: #fffbe3;
    border: 1px solid #fce96a;
    color: #92400e;
}

.redirect-box.warning i {
    color: #d97706;
}

.redirect-box.success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.redirect-box.success i {
    color: #16a34a;
}

.redirect-box p {
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}

.redirect-box p a {
    color: #2563eb;
    text-decoration: underline;
    word-break: break-all;
}

/* Glassmorphism Auth Page Layout */
.auth-page {
    /* background: url('your-background-image.jpg') no-repeat center center fixed; */
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
}

/* Glassmorphism Card Container */
.auth-card {
    background: rgba(18, 22, 36, 0.55);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.125);
    border-radius: 20px;
    padding: 40px 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
                inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* From https://css.glass */
background: rgba(255, 255, 255, 0.2);
border-radius: 16px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.253);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Branding & Typography */
.auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

.auth-brand img {
    height: 50px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.auth-brand h2 {
    color: #0f0f0f;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Form Structure & Modern Inputs */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    color: rgba(27, 27, 27, 0.85);
    font-size: 0.88rem;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Glass Input Styling */
.form-group input,
.password-wrapper input {
width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgb(51 51 51 / 63%);
    border-radius: 0;
    color: #070707;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: rgba(71, 71, 71, 0.4);
}

.form-group input:focus,
.password-wrapper input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

/* Password Toggle Icon */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 42px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #3b82f6;
}

/* Vibrant Glowing Button */
.btn-full {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
    transition: all 0.3s ease;
}

.btn-full:hover {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.btn-full:active {
    transform: translateY(0);
}

/* Footer Link Area */
.auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 0.88rem;
    color: rgba(26, 25, 25, 0.7);
}

.auth-footer a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Error Notification Styling */
.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 18px;
    text-align: center;
}

/* General Base Layout Adjustments */
.main-wrapper {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

/* Mobile Toggle Buttons */
.mobile-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #1e293b;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
}

.mobile-close-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: #64748b;
    cursor: pointer;
    margin-left: auto;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Base Sidebar Styling */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, width 0.3s ease;
    overflow-y: auto;
}

/* Tablet View (768px - 1024px): Compact Hover Sidebar */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 72px;
    }

    .sidebar:hover {
        width: 260px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

    .sidebar .brand span,
    .sidebar .menu-label,
    .sidebar .menu-group ul li a span,
    .sidebar .btn-activate span,
    .sidebar .user-info {
        opacity: 0;
        visibility: hidden;
        white-space: nowrap;
        transition: opacity 0.2s ease;
    }

    .sidebar:hover .brand span,
    .sidebar:hover .menu-label,
    .sidebar:hover .menu-group ul li a span,
    .sidebar:hover .btn-activate span,
    .sidebar:hover .user-info {
        opacity: 1;
        visibility: visible;
    }

    .main-wrapper {
        margin-left: 72px;
    }
}

/* Mobile Off-Canvas Drawer (<768px) */
@media (max-width: 768px) {
    .mobile-toggle-btn {
        display: inline-block;
    }

    .mobile-close-btn {
        display: block;
    }

    .sidebar {
        width: 270px;
        transform: translateX(-100%); /* Hide off-screen by default */
    }

    .sidebar.active {
        transform: translateX(0); /* Slide into view when toggled */
    }

    .main-wrapper {
        margin-left: 0 !important;
    }
}