@font-face {
  font-family: 'Product Sans';
  /* The path is relative to the CSS file itself */
  src: url('../fonts/ProductSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

:root {
    --md-sys-color-primary: #004d40;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-surface-container-highest: #B2DFDB;
    --card-background:#B2DFDB;
    --md-sys-color-outline: #80cbc4;
    --md-sys-color-background: #e0f2f1;
    --md-sys-color-on-surface: #004D40;
    --font-family-sans-serif: 'Product Sans', sans-serif;
}

*{
    font-family:'Product Sans', sans-serif;
}
body {
    font-family: var(--font-family-sans-serif);
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-surface);
    margin: 0;
}

header {
    background-color: var(--md-sys-color-surface-container-highest);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--md-sys-color-outline);
}

main {
    padding: 2rem;
    display: grid;
    gap: 2rem;
}

section {
    background: var(--md-sys-color-surface-container-highest);
    padding: 1.5rem;
    border-radius: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 20px;
    border: 1px solid var(--md-sys-color-outline);
    background-color: transparent;
    color: var(--md-sys-color-primary);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
}
.button:hover {
    background-color: rgba(103, 80, 164, 0.08);
}
.button.primary {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
}
.button.primary:hover {
    box-shadow: 0 1px 3px 1px rgba(0,0,0,0.15);
}
.button.icon-button .material-symbols-outlined {
    margin-right: 8px;
}
/* Inline spinner for buttons */
.button .spinner-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: text-bottom;
    animation: btn-spin 0.9s linear infinite;
}
.button.is-loading { opacity: 0.8; pointer-events: none; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: auto; /* allow page to scroll if content is taller than viewport */
}
.modal-content {
    background: var(--md-sys-color-background);
    padding: 2rem;
    border-radius: 28px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px 3px rgba(0,0,0,0.15);
    max-height: 90vh;          /* keep modal within the viewport height */
    overflow-y: auto;          /* scroll long modal content */
    display: flex;
    flex-direction: column;
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.form-group input, .form-group select {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--md-sys-color-outline);
    box-sizing: border-box;
}
.form-group-inline { display: flex; gap: 1rem; }
.form-group-inline .form-group { flex: 1; }
.modal-actions { margin-top: 2rem; text-align: right; }

/* Custom Schedule layout */
#custom-schedule { display: flex; flex-direction: column; gap: 10px; }
.day-row { display: grid; grid-template-columns: minmax(140px, 1fr) 1fr 1fr; gap: 8px; align-items: center; }
.day-row label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.day-row input[type="time"] {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--md-sys-color-outline);
    box-sizing: border-box;
}
.day-row input[type="time"]:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 520px) {
    .day-row { grid-template-columns: 1fr; }
}

.card {
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid var(--md-sys-color-outline);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}
.card-actions { display: flex; gap: 0.5rem; }
.status-indicator { padding: 4px 8px; border-radius: 12px; color: white; font-size: 0.8em; }
.status-green { background-color: #34A853; }
.status-yellow { background-color: #FBBC04; }
.status-red { background-color: #EA4335; }
.qr-code-thumb { width: 40px; height: 40px;padding-right: 16px;margin-right: 16px;border-right: 1px solid #333;}
.barcode-thumb { height: 40px;margin-right: 16px;}

/* Toast Notification Styles */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, bottom 0.3s;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    bottom: 40px;
}

.toast-success {
    background-color: #34A853; /* Green */
}

.toast-error {
    background-color: #EA4335; /* Red */
}

.toast-info {
    background-color: #4285F4; /* Blue */
}

/* In style.css */
.button.destructive {
    background-color: #d32f2f; /* A shade of red */
    color: white;
}
.button.destructive:hover {
    background-color: #b71c1c; /* A darker red for hover */
}
.section-header{
    display: flex;
    justify-content: space-between;
    margin-bottom: 22px;

}
#add-class-btn{
    background: #00897B;
    color: #e0f2f1;
}
h4{
    font-size: 23px;
    padding: 5px;
    margin: 0px;
}

/* ================================== */
/*   Tab Navigation Styles            */
/* ================================== */

.tab-nav {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}

.tab-button:hover {
    background-color: #f0f0f0;
}

/* This is the style for the SELECTED tab button */
.tab-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 500;
}

/* This is the rule that HIDES the inactive content panes */
.tab-pane {
    display: none;
}

/* This is the rule that SHOWS the active content pane */
.tab-pane.active {
    display: block;
}
/* ================================== */
/*   Data Table Styles (for Reports/History) */
/* ================================== */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th,
.data-table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.data-table th {
    background-color: #f2f2f2;
    font-weight: 500;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.button-group{
    display: flex;
    gap: 8px;
}

#add-student-to-class-btn, #import-students-btn{
    color: #e0f2f1;
    background: #004d40;
    height: 60px;
}
.stacon{
    display: flex;
    align-items: center;
    gap: 20px;
}
#back-to-classes-link{
    background: #009688;
    color: #B2DFDB;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 23px;
}
#scanner-overlay > #attendance-taker {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-width: 550px;
    width: 90%;

}
