/* =========================
   Dashboard Layout
========================= */
/*
.navbar {
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .logo {
    font-size: 1.2rem;
    font-weight: bold;
}

.profile-menu {
    position: relative;
    display: inline-block;
}

.profile-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--color-white);
    transition: transform 0.3s ease;
}

.profile-icon:hover {
    transform: scale(1.1);
}

.dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    list-style: none;
    width: 220px;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
    z-index: 2000;
}

.dropdown.show {
    display: flex;
}

.dropdown li {
    border-bottom: 1px solid #eee;
}

.dropdown li:last-child {
    border-bottom: none;
}

.dropdown a {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--color-dark);
    transition: background 0.3s ease;
}

.dropdown a:hover {
    background: var(--color-light);
    color: var(--color-primary);
}

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 240px;
    background: var(--color-white);
    border-right: 1px solid #ddd;
    transition: all 0.3s ease;
    padding-top: 1rem;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin: 0.5rem 0;
}

.sidebar nav ul a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--color-dark);
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar nav ul a i {
    margin-right: 0.8rem;
}

.sidebar nav ul a:hover {
    background: var(--color-light);
    color: var(--color-primary);
    padding-left: 1.3rem;
}

.content {
    flex: 1;
    padding: 2rem;
    background: var(--color-light);
    animation: slideIn 0.5s ease;
}

.content h1 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .sidebar nav ul a {
        justify-content: center;
    }
}

.notice-box {
    margin: 30px 0;
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
}

.notice-box strong {
    font-weight: 600;
} */



:root {
    --blue: #0676D0;
    --green: #32cd32;
    --orange: #ff914d;
    --white: #fff;
    --black: #000;
    --gray: #f2f2f2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

.dashboard-container {
    max-width: 1400px;
    margin: 20px auto;
}

.portal-container {
    background: #1a2535;
    border-radius: 15px;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.header img {
    height: 120px;
    width: 100px;
}

.header-center {
    text-align: center;
    flex: 1;
    margin: 0 1rem;
}

.header-center h1 {
    font-size: 24px;
    color: var(--black);
}

.header-center p {
    font-size: 16px;
    color: #555;
    margin-top: 4px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    background: var(--gray);
    color: var(--black);
    padding: 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: 0.3s;
    text-align: center;
}

.action-btn:hover {
    background: var(--green);
    transform: translateY(-3px) scale(1.05);
}

.action-btn img {
    display: block;
    margin-bottom: 5px;
    width: 32px;
    height: 32px;
}

.content-container {
    background: var(--gray);
    border-radius: 10px;
    padding: 1rem;
    min-height: 200px;
    margin: 20px 0;
    overflow-x: auto;
}

.content-container table {
    width: 100%;
    border-collapse: collapse;
}

.attendance-table {
    overflow-x: auto;
}

.attendance-table table {
    width: 100%;
    border-collapse: collapse;

}

/* Only color the last cell (Status column) based on attendance status */
.attendance-table table tr td:last-child {
    font-weight: bold;
}

/* Present → Green */
.attendance-table table tr td:last-child.present {
    background-color: #28a745;
    color: #fff;
    border-radius: 4px;
    text-align: center;
    padding: 4px 8px;
}

/* Late → Yellow */
.attendance-table table tr td:last-child.late {
    background-color: #ffc107;
    color: #000;
    border-radius: 4px;
    text-align: center;
    padding: 4px 8px;
}

/* Absent → Red */
.attendance-table table tr td:last-child.absent {
    background-color: #dc3545;
    color: #fff;
    border-radius: 4px;
    text-align: center;
    padding: 4px 8px;
}

.attendance-table table tr td:last-child.dayoff {
    background-color: #007BFF;
    color: #fff;
    border-radius: 4px;
    text-align: center;
    padding: 4px 8px;
}


.content-container th,
.content-container td {
    border: 1px solid #ccc;
    padding: 0.5rem;
    text-align: center;
}

.content-container th {
    background: var(--blue);
    color: #fff;
}

.select-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.select-group input,
.select-group select {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.select-group input:focus,
.select-group select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 5px rgba(6, 118, 208, 0.3);
}

.submit-btn {
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.submit-btn:hover {
    background: var(--green);
}

.coming-soon {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    padding: 2rem;
    color: #555;
}

/* Admit Card Styles */
.admit-card {
    background: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin: auto;
}

.college-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.college-header img {
    height: 60px;
    margin-right: 1rem;
}

.college-header h2 {
    margin: 0;
    font-size: 20px;
    color: #0676D0;
}

.college-header p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid #0676D0;
}

.student-details p {
    margin: 0.3rem 0;
    font-size: 14px;
}

.subjects-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.subjects-table th,
.subjects-table td {
    border: 1px solid #ccc;
    padding: 0.5rem;
    text-align: center;
}

.subjects-table th {
    background: #0676D0;
    color: #fff;
}

.exam-notes p {
    font-size: 14px;
    color: #555;
    background: #f2f2f2;
    padding: 0.5rem;
    border-radius: 5px;
}

.result-section {
    margin-top: 20px;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-card {
    display: flex;
    justify-content: space-between;
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    border-left: 5px solid #999;
}

.result-card.next {
    border-left-color: #0084ff;
}

.result-card.pending {
    border-left-color: #ff4d4d;
}

.badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}

.badge.next {
    background: #0084ff;
    color: #fff;
}

.badge.pending {
    background: #ff4d4d;
    color: #fff;
}


@media(max-width:600px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .header img {
        margin-bottom: 0.5rem;
    }

    .student-info {
        flex-direction: column;
        align-items: center;
    }

    .student-details p {
        text-align: center;
    }
}

@media(max-width:420px) {
    body {
        padding: 0
    }
}

/* Receipt card styling */
.receipt-card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    max-width: 700px;
    margin: auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    font-family: Roboto, sans-serif;
}

/* Hide everything except receipt when printing */
@media print {
    body * {
        visibility: hidden;
    }

    .receipt-card,
    .receipt-card * {
        visibility: visible;
    }

    .receipt-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    .admit-card,
    .admit-card * {
        visibility: visible;
    }

    .admit-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}



/* ===================== ID CARD ===================== */
.id-card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 20px;
}

.id-card {
    width: 2.25in;
    height: 3.5in;
    background: #fff;
    border: 2px solid #0676D0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.id-card-header {
    background: #0676D0;
    color: white;
    text-align: center;
    padding: 5px;
    font-size: 12px;
    font-weight: bold;
}

.id-card-front .photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 10px auto;
    border: 2px solid #0676D0;
}

.id-card-front .photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.id-card-front .info {
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
    color: #000;
}

.id-card-front .info strong {
    color: #0676D0;
}

.id-card-back {
    padding: 10px;
    text-align: center;
    font-size: 11px;
    color: #000;
}

.id-card-back img {
    width: 50px;
    height: auto;
    margin-bottom: 5px;
}

.id-card-back p {
    margin-bottom: 5px;
}

.print-btn {
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.print-btn:hover {
    background: var(--green);
}

/* Print only ID card */
@media print {
    body * {
        visibility: hidden;
    }

    .id-card-container,
    .id-card-container * {
        visibility: visible;
    }

    .id-card-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        justify-content: center;
    }

    .print-btn {
        display: none;
    }
}

@media(max-width:600px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .header img {
        margin-bottom: 0.5rem;
    }
}

/* Main Container */
.routine-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

/* 3 Card Section */
.routine-section {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

/* Routine Card */
.routine-box {
    background: var(--white);
    padding: 18px 22px;
    border-radius: 12px;
    width: 32%;
    min-width: 260px;
    border-left: 6px solid var(--blue);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
    transition: 0.25s ease;
}

.routine-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

/* Card Header */
.routine-box h3 {
    font-size: 19px;
    margin-bottom: 12px;
    color: var(--black);
}

/* List Items */
.routine-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.routine-box ul li {
    background: var(--gray);
    padding: 7px 12px;
    border-radius: 6px;
    margin-bottom: 7px;
    font-size: 14px;
    color: var(--black);
}

/* Buttons */
.routine-btn {
    background: var(--blue);
    color: var(--white);
    border: none;
    padding: 11px 16px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.routine-btn:hover {
    background: var(--orange);
}

.upcoming-container {
    margin: 30px auto;
}

.upcoming-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.upcoming-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.upcoming-card.quiz {
    border-left: 5px solid #FF9800;
}

.upcoming-card.exam {
    border-left: 5px solid #E91E63;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.badge.quiz {
    background: #FF9800;
}

.badge.exam {
    background: #E91E63;
}

/* Mobile Responsive */
@media (max-width: 760px) {
    .routine-container {
        flex-direction: column;
        align-items: center;
    }

    .routine-box {
        width: 100%;
    }

    .routine-btn {
        width: 100%;
    }
}

.student-info-top {
    margin: 30px 0;
    display: flex;
    flex-wrap: wrap;
    /* allows wrapping on smaller screens */
    gap: 15px;
    /* space between items */
    font-size: 14px;
    background: var(--gray);
    padding: 10px 15px;
    border-radius: 8px;
    justify-content: center;
    /* center horizontally */
}

.student-info-top span {
    white-space: nowrap;
    /* prevent line breaks inside each span */
}

/* ===================================
   NEW STUDENT PORTAL LAYOUT SYSTEM
   Styles for ssd- (student student design) prefix
   =================================== */

/* ──── MAIN CONTAINER ──── */
#student-portal {
  width: 100%;
}

.ssd-hidden-input {
  display: none;
}

/* ──── LAYOUT SHELL (Two-Column Grid) ──── */
.ssd-layout-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: calc(100vh - 60px);
  background: var(--bg-app);
}

/* ──── SIDEBAR ADJUSTMENTS ──── */
.ssd-layout-shell .sidebar {
  grid-column: 1;
  height: calc(100vh - 60px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--c3) var(--bg-app);
}

/* Webkit scrollbar fix for sidebar */
.ssd-layout-shell .sidebar::-webkit-scrollbar {
  width: 6px;
}

.ssd-layout-shell .sidebar::-webkit-scrollbar-track {
  background: var(--bg-app);
}

.ssd-layout-shell .sidebar::-webkit-scrollbar-thumb {
  background: var(--c3);
  border-radius: 3px;
}

.ssd-layout-shell .sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--c4);
}

/* ──── CONTENT WRAPPER ──── */
.ssd-content-wrapper {
  grid-column: 2;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  min-height: calc(100vh - 60px);
}

/* ──── CARD STYLES ──── */
.ssd-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.ssd-card:hover {
  border-color: var(--c4);
  box-shadow: var(--glow-accent);
}

/* ──── NAVIGATION CARD ──── */
.ssd-nav-card {
  display: flex;
  flex-direction: column;
}

.ssd-nav-header {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.1));
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ssd-nav-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.ssd-nav-header p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--c4);
  font-weight: 600;
}

/* ──── DASHBOARD BUTTON GRID ──── */
.ssd-dashboard-btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-surface);
}

.ssd-dashboard-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  background: rgba(51, 65, 85, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  min-height: 90px;
}

.ssd-dashboard-btn:hover {
  background: var(--c3);
  color: var(--text-primary);
  border-color: var(--c4);
  transform: translateY(-2px);
}

.ssd-dashboard-btn.ssd-btn-active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--c4);
  color: var(--c4);
  box-shadow: inset 0 0 12px rgba(6, 182, 212, 0.1);
}

.ssd-nav-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ssd-nav-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

/* ─────────────────────────────────────
   MOBILE RESPONSIVE STYLES
   ───────────────────────────────────── */

@media (max-width: 1024px) {
  .ssd-layout-shell {
    grid-template-columns: 200px 1fr;
  }

  .ssd-content-wrapper {
    padding: 16px;
  }

  .ssd-dashboard-btn-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    padding: 12px 16px;
  }
}

@media (max-width: 768px) {
  /* STACK LAYOUT ON TABLET */
  .ssd-layout-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .ssd-layout-shell .sidebar {
    grid-column: 1;
    height: auto;
    max-height: 400px;
    overflow-x: hidden;
    position: sticky;
    top: 60px;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    border-right: none;
  }

  .ssd-content-wrapper {
    grid-column: 1;
    padding: 16px;
    min-height: auto;
  }

  .ssd-nav-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .ssd-dashboard-btn-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
    padding: 12px 16px;
  }

  .ssd-dashboard-btn {
    min-height: 80px;
    padding: 12px 8px;
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  /* MOBILE: FULL STACK */
  .ssd-layout-shell .sidebar {
    max-height: none;
    position: static;
  }

  .ssd-nav-header {
    padding: 12px 16px;
  }

  .ssd-nav-header h2 {
    font-size: 1rem;
  }

  .ssd-nav-header p {
    font-size: 0.75rem;
  }

  .ssd-dashboard-btn-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px;
  }

  .ssd-dashboard-btn {
    min-height: 70px;
    padding: 10px 6px;
    font-size: 11px;
  }

  .ssd-content-wrapper {
    padding: 12px;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .ssd-dashboard-btn-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ssd-dashboard-btn {
    min-height: 60px;
    padding: 8px 4px;
    font-size: 10px;
  }

  .ssd-content-wrapper {
    padding: 8px;
  }
}
