/* =====================================================
   Glassmorphism Pastel Theme - Production Ready
   Unified across User/Admin/Forms/Tables/Modals
   Palette: Blue + Lavender + Mint Pastels
   Border radius: 16px
===================================================== */

:root {
    --heading-font: 'Calibri', sans-serif; /* You can change this later easily */
}


/* ---------------- RESET & BASE ---------------- */
* { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; }
body {
  font-family: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(135deg,#F3F6FF 0%,#F7F9FF 50%,#F6F5FF 100%);
  color: #314151;
  line-height:1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------------- THEME COLORS ---------------- */
:root {
  --primary: #6A8DFF;
  --primary-light: #9EB6FF;
  --accent-lav: #C9B8FF;
  --mint: #A4E7D2;
  --glass-bg: rgba(255,255,255,0.46);
  --glass-border: rgba(255,255,255,0.55);
  --muted: #7a8a99;
  --danger-soft: #FFCCCC;
  --success-soft: #CFFFE1;
  --warning-soft: #FFE9C6;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(106,141,255,0.09);
}

/* ---------------- CONTAINERS ---------------- */
.container, .dashboard-container, .admin-dashboard {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 20px;
}

/* ---------------- TOPBAR / HEADER ---------------- */
.topbar, .top-nav {
  background: linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0.24));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 0 0 var(--radius) var(--radius);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(78,96,255,0.05);
}
.topbar h1, .top-nav h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
}
.topbar .user-area {
  display:flex; align-items:center; gap:12px; color: #233648; font-weight:600;
}
.topbar .avatar {
  width:36px; height:36px; border-radius:50%;
  background: linear-gradient(135deg,#ffffff,#F0F6FF);
  display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--primary);
  border:1px solid rgba(255,255,255,0.6);
  box-shadow: 0 4px 14px rgba(106,141,255,0.06);
}
.logout-btn, .topbar a.logout-btn {
  background: linear-gradient(180deg,#FFBDBD,#FFB3B3);
  color: #5a1515;
  padding: 9px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight:700;
  border:none;
  cursor:pointer;
  transition: transform .15s ease, filter .15s ease;
}
.logout-btn:hover, .topbar a.logout-btn:hover {
  transform: translateY(-2px);
  filter:brightness(1.02);
}
/* Logo in topbar */
.topbar-logo {
    height: 36px;       /* same height as avatar for balance */
    width: auto;
    border-radius: 6px; /* optional, slight rounding */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
/* User Header Topbar */
.user-topbar {
    background: linear-gradient(90deg, #007BFF, #00BFFF);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    border-radius: 0 0 10px 10px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    font-size: 22px;
}

.topbar-logo {
    height: 40px;
    width: auto;
}

.portal-name {
    font-weight: bold;
}

.user-area {
    font-weight: 600;
    font-size: 16px;
}

.user-area .logout-btn {
    color: white;
    text-decoration: underline;
    margin-left: 6px;
}
/* ---------------- TOPBAR / HEADER ---------------- */
.user-topbar {
    background: rgba(255, 255, 255, 0.34); /* soft glass */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.4);
    padding: 14px 20px;
    display: flex; /* fixed syntax */
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 14px rgba(78,96,255,0.05);
}

/* Left section: Logo + Portal Name */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 20px;
    color: #233648; /* consistent with other headers */
}

.topbar-logo {
    height: 36px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Portal Name */
.portal-name {
    font-weight: 600;
    font-size: 20px;
    color: #233648; /* consistent color */
}

/* Right section: User info + Logout */
.user-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-text {
    color: #233648; /* same as other headers */
    font-weight: 600;
    font-size: 16px;
}

/* Logout button smaller and neat */
.user-area .logout-btn {
    background: linear-gradient(180deg,#FFBDBD,#FFB3B3);
    color: #5a1515;
    padding: 4px 10px;       /* smaller padding */
    border-radius: 8px;
    font-size: 14px;         /* smaller font */
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
}

.user-area .logout-btn:hover {
    transform: translateY(-1px); /* subtle hover */
    filter: brightness(1.05);
}


/* ---------------- CARDS (USER/ADMIN) ---------------- */
.card, .form-container, .table-card, .preview-card, .profile-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease;
  margin-bottom: 18px;
}
.card:hover, .form-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(106,141,255,0.14);
}
.card h2, .form-container h2, .table-card h2 {
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ---------------- FORMS / INPUTS ---------------- */
label { display:block; margin-bottom:8px; font-weight:600; color:var(--muted); }
input, textarea, select {
  width:100%; padding:12px 14px; border-radius:12px;
  border:1px solid rgba(122,147,255,0.28); background: rgba(255,255,255,0.7);
  font-size:15px; color:#22303a; margin-bottom:14px;
  transition: box-shadow .18s ease, border-color .18s ease, transform .12s ease;
}
input:focus, textarea:focus, select:focus {
  outline:none;
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(106,141,255,0.08);
  transform: translateY(-1px);
}
.helper { font-size:13px; color:#7e8f9e; margin-top:-8px; margin-bottom:10px; }

/* ---------------- BUTTONS ---------------- */
.btn, button, .section-btn {
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 18px; border-radius: 14px; border:none; font-weight:700; cursor:pointer;
  transition: transform .12s ease, filter .12s ease;
}
.btn-primary, .section-btn {
  background: linear-gradient(90deg, var(--mint), var(--primary-light));
  color:#053126; font-size:15px;
  box-shadow: 0 8px 26px rgba(124,158,255,0.08);
}
.btn-primary:hover, .section-btn:hover { transform: translateY(-2px); filter:brightness(1.02); }
.btn-ghost { background: rgba(255,255,255,0.66); color: var(--primary); border:1px solid rgba(122,147,255,0.18); }
.btn-danger { background: linear-gradient(90deg,#FFB3B3,#FF8E8E); color:#5a1515; }
.btn-disabled, .disabled-btn[disabled] { background: rgba(0,0,0,0.06); color:#9aa6b4; cursor:not-allowed; }


/* ---------------- BADGES ---------------- */
.badge { display:inline-block; padding:8px 12px; border-radius:999px; font-weight:700; font-size:13px;
        box-shadow: 0 6px 18px rgba(106,141,255,0.05); }
.badge.Completed { background: var(--success-soft); color:#13482b; border:1px solid rgba(31,87,48,0.08); }
.badge.Pending { background: var(--warning-soft); color:#7a4f19; border:1px solid rgba(186,142,59,0.06); }
.badge.InProgress { background: var(--primary-light); color:#0f4f73; border:1px solid rgba(45,124,187,0.06); }
.badge.Rejected { background: var(--danger-soft); color:#7a1f1f; border:1px solid rgba(186,70,70,0.06); }

/* ---------------- PROGRESS BARS ---------------- */
.progress-wrap { width:100%; margin:12px 0; }
.progress-label { font-weight:700; color:var(--muted); margin-bottom:8px; font-size:13px; }
.progress-box { width:100%; height:14px; border-radius:999px; background: rgba(255,255,255,0.48); border:1px solid rgba(122,147,255,0.12); overflow:hidden; }
.progress-bar { height:100%; border-radius:999px; background: linear-gradient(90deg,var(--mint), var(--primary)); width:0%; transition: width .42s cubic-bezier(.2,.9,.2,1); }

/* ---------------- TABLES ---------------- */
.table, table { width:100%; border-collapse: seperate; background: transparent; }
.table th, .table td { padding:12px 20px; text-align:left; font-size:14px; }
.table thead th { background: linear-gradient(180deg, rgba(122,147,255,0.9), rgba(124,158,255,0.8)); color:white; font-weight:700; border-radius:8px; }
.table tbody tr { background: rgba(255,255,255,0.6); border-radius:8px; margin-bottom:8px; }
.table tbody tr:nth-child(even) { opacity:0.98; }
.table td { border-bottom: 1px solid rgba(0,0,0,0.04); color:#2b3b47; }
.table-card { padding:18px; }

/* ---------------- ADMIN DASHBOARD ---------------- */
.admin-dashboard { padding:28px 18px; }
.dashboard-header { margin-bottom:18px; }
.dashboard-header h1 { color: var(--primary); font-size:22px; font-weight:800; }
.welcome-text { color:var(--muted); margin-top:6px; font-size:13px; }
.dashboard-controls { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }
.search-input, .filter-status { padding:10px 12px; border-radius:12px; border:1px solid rgba(122,147,255,0.12); background: rgba(255,255,255,0.7); }

/* ---------------- MODALS ---------------- */
.modal { position: fixed; inset:0; display:flex; align-items:center; justify-content:center; background: rgba(15,20,30,0.42); z-index:1200; opacity:0; pointer-events:none; transition: opacity .2s ease; }
.modal.show { opacity:1; pointer-events:auto; }
.modal .modal-content { width:92%; max-width:900px; border-radius:14px; padding:22px; background: rgba(255,255,255,0.54); backdrop-filter: blur(12px); border:1px solid rgba(255,255,255,0.6); }

/* ---------------- RESPONSIVE ---------------- */
@media(max-width:980px){ .container, .admin-dashboard{padding:18px;} .sidebar{display:none;} }
@media(max-width:720px){
  .topbar{padding:12px;} .topbar h1{font-size:18px;}
  .card, .form-container, .table-card { padding:16px; margin:12px; border-radius:12px; }
  .btn, button, .section-btn{width:100%; padding:12px;}
}

/* ---------------- UTILITY ---------------- */
.text-muted{color:var(--muted);}
.flex{display:flex;align-items:center;gap:10px;}
.row{display:flex;gap:12px;}
.col{flex:1;}
.center{display:flex;align-items:center;justify-content:center;}
.mt-8{margin-top:8px;} .mb-8{margin-bottom:8px;} .p-8{padding:8px;} .p-12{padding:12px;}


/* ---------------- RADIO BUTTONS ---------------- */
/* Common radio button container */
.radio-group {
    display: flex;
    gap: 12px; /* small gap between buttons */
    margin-bottom: 20px;
}

/* Individual radio button wrapper */
.radio-btn {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

/* Hide default radio input */
.radio-btn input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Custom styled button */
.radio-btn span {
    display: inline-block;
    padding: 6px 16px; /* smaller padding */
    border: 2px solid #ccc;
    border-radius: 8px;
    transition: all 0.3s;
    min-width: 70px; /* smaller width */
    text-align: center;
    font-size: 14px; /* smaller font */
    background: #f8f9fa;
    color: #333;
}

/* Checked state */
.radio-btn input:checked + span {
    background: #2e6ef7;
    color: #fff;
    border-color: #2e6ef7;
}

/* Hover effect */
.radio-btn span:hover {
    border-color: #2e6ef7;
    background: rgba(46, 110, 247, 0.1);
}

/* ---------------- SECTION CONTAINER & CARDS ---------------- */
.section-container {
  max-width: 1100px;       /* central container width */
  margin: 32px auto;       /* centered with vertical spacing */
  padding: 0 20px;         /* horizontal padding */
}

.section-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  transition: transform .22s ease, box-shadow .22s ease;
}

.section-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(106,141,255,0.12);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  text-align: left;
}

/* ---------------- SECTION NAVIGATION ---------------- */
.section-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 24px 0;
  justify-content: flex-start;
}

.section-nav a {
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  background: rgba(255,255,255,0.65);
  color: var(--primary);
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 14px rgba(106,141,255,0.06);
}

.section-nav a.active {
  background: linear-gradient(90deg, var(--mint), var(--primary-light));
  color: #053126;
  box-shadow: 0 8px 26px rgba(124,158,255,0.08);
}

/* ---------------- FORM GROUP SUBTITLES ---------------- */
.form-group-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 18px;
  margin-bottom: 10px;
}

/* ---------------- FORM BUTTON ALIGNMENT ---------------- */
.form-btn-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.submit-btn, .btn-primary {
  min-width: 160px;
  text-align: center;
}


/* ---- Auth Page Wrapper ---- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background-color: #E8F0FF; /* fallback background */
    background-image: url('https://i.pinimg.com/736x/69/c4/e9/69c4e91990f070d45657dcaebf6d812b.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Overlay to soften the background image */
.auth-wrapper::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(232, 240, 255, 0.5); /* soft blue overlay */
    z-index: 0;
}

/* Glass Card */
.auth-card {
    width: 100%;
    max-width: 430px;
    padding: 40px 35px;
    border-radius: 14px;
    background-color: #FFFFFF; /* card background */
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    text-align: left;
    position: relative;
    z-index: 1; /* bring card above overlay */
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

/* Logo */
.auth-logo {
    width: 75px;
    height: 75px;
    margin: 0 auto 8px; /* reduced margin-bottom to fit subtitle */
    display: block;
    animation: floating 2s infinite ease-in-out;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.1));
}


/* Subtitle under logo */
.auth-subtitle {
    text-align: center;
    font-size: 14px;
    color: #3A3A3A;
    margin-bottom: 12px;
}


/* Headings */
.auth-card h2 {
    font-family: var(--heading-font);
    font-size: 28px;
    font-weight: 600;
    color: #1A2A3A; /* heading color */
    text-align: center; /* center heading */
    margin-bottom: 25px;
}

/* Labels */
.auth-card label {
    font-size: 14px;
    font-weight: 400;
    color: #3A3A3A; /* body text color */
    display: block;
    margin-bottom: 6px;
}

/* Inputs */
.auth-card input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    background-color: #F0F4FF; /* input background */
    font-size: 15px;
    color: #3A3A3A;
    text-align: left;       /* left-align text */
    transition: 0.3s;
}

.auth-card input:focus {
    border: 1px solid #4A90E2; /* focus border */
    box-shadow: 0 2px 8px rgba(74,144,226,0.25);
    outline: none;
}

/* Button */
.auth-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #FFFFFF;
    background-color: #4A90E2; /* primary button */
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 12px rgba(74,144,226,0.35);
}

.auth-btn:hover {
    background-color: #357ABD; /* button hover */
    transform: scale(1.02);
    box-shadow: 0 0 18px rgba(74,144,226,0.55);
}

/* Links */
.auth-links {
    margin-top: 18px;
    font-size: 14px;
    color: #3A3A3A;
    text-align: center;
}

.auth-links a {
    color: #4A90E2;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Floating logo animation */
@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
/* ---------- CHECKBOX FIX ---------- */
.checkbox-wrapper {
    display: flex;
    align-items: center; /* vertically centers checkbox with text */
    gap: 10px;           /* space between checkbox and label */
    margin: 12px 0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;           /* remove default margins */
    vertical-align: middle; /* extra safety */
    accent-color: var(--primary); /* theme color */
}

.checkbox-wrapper label {
    margin: 0;
    font-size: 14px;
    color: #2b3b47;
    line-height: 1.4;   /* ensures text aligns properly */
    cursor: pointer;
}
.form-btn-wrapper {
    margin-top: 8px;      /* gap between checkbox and button */
    display: flex;         
    justify-content: flex-end; /* aligns button to the right */
}


