/**
 * School Auth & Portal Manager CSS
 */

.sam-auth-wrapper {
    width: 100%;
    max-width: 580px;
    margin: 40px auto;
    font-family: inherit;
    box-sizing: border-box;
}

.sam-auth-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 12px 36px -4px rgba(30, 58, 138, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.sam-auth-header {
    text-align: center;
    margin-bottom: 26px;
}

.sam-auth-pill {
    display: inline-block;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.sam-auth-title {
    color: #0f172a;
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.sam-auth-subtitle {
    color: #64748b;
    font-size: 14.5px;
    margin: 0;
    line-height: 1.5;
}

/* Tabs */
.sam-auth-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
    gap: 6px;
    margin-bottom: 26px;
    border: 1px solid #e2e8f0;
}

.sam-tab-btn,
button.sam-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    background: transparent !important;
    border: 1px solid transparent !important;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #475569 !important;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    text-align: center;
    box-shadow: none !important;
    outline: none !important;
}

.sam-tab-btn:hover,
button.sam-tab-btn:hover {
    color: #1e3a8a !important;
    background: rgba(255, 255, 255, 0.6) !important;
}

.sam-tab-btn.active,
button.sam-tab-btn.active {
    background: #ffffff !important;
    color: #1e3a8a !important;
    font-weight: 700 !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

/* Tab Panes */
.sam-tab-pane {
    display: none;
    animation: samFadeIn 0.25s ease-out;
}

.sam-tab-pane.active {
    display: block;
}

@keyframes samFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Fields */
.sam-field-group {
    margin-bottom: 18px;
}

.sam-label {
    display: block;
    font-weight: 700;
    font-size: 13.5px;
    color: #1e293b;
    margin-bottom: 6px;
}

.sam-required {
    color: #ef4444;
}

.sam-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.sam-input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    color: #64748b;
    pointer-events: none;
}

.sam-input,
.sam-select {
    width: 100%;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 14px 12px 42px;
    font-size: 14.5px;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.sam-form-grid-2 .sam-input,
.sam-form-grid-3 .sam-input,
.sam-form-grid-3 .sam-select {
    padding-left: 14px;
}

.sam-input:focus,
.sam-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.sam-toggle-pass,
button.sam-toggle-pass {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    font-size: 16px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    color: #64748b !important;
    padding: 6px 8px !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    outline: none !important;
    transition: background 0.15s, color 0.15s !important;
    z-index: 3 !important;
}

.sam-toggle-pass:hover,
button.sam-toggle-pass:hover {
    background: #f1f5f9 !important;
    color: #1e3a8a !important;
}

.sam-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 20px;
    color: #475569;
}

.sam-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.sam-forgot-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.sam-forgot-link:hover {
    text-decoration: underline;
}

.sam-btn-submit {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sam-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.sam-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Grids for register form */
.sam-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.sam-form-grid-3 {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .sam-form-grid-2,
    .sam-form-grid-3 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .sam-auth-card {
        padding: 24px 18px;
    }
    .sam-auth-tabs {
        flex-wrap: wrap;
    }
    .sam-tab-btn {
        flex: 1 1 45%;
        font-size: 12.5px;
    }
}

/* Demo Section */
.sam-demo-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed #cbd5e1;
}

.sam-demo-title {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sam-demo-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sam-demo-btn,
button.sam-demo-btn {
    width: 100% !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: none !important;
    outline: none !important;
}

.sam-demo-stu,
button.sam-demo-stu {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}
.sam-demo-stu:hover,
button.sam-demo-stu:hover {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.sam-demo-adm,
button.sam-demo-adm {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}
.sam-demo-adm:hover,
button.sam-demo-adm:hover {
    background: #dbeafe !important;
    color: #1e40af !important;
}

.sam-demo-tea,
button.sam-demo-tea {
    background: #fdf4ff !important;
    color: #a21caf !important;
    border: 1px solid #f0abfc !important;
}
.sam-demo-tea:hover,
button.sam-demo-tea:hover {
    background: #fae8ff !important;
    color: #86198f !important;
}

.sam-demo-par {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}
.sam-demo-par:hover {
    background: #fef3c7;
}

/* Switch Prompt */
.sam-switch-prompt {
    margin-top: 18px;
    text-align: center;
    font-size: 13.5px;
    color: #64748b;
}

.sam-switch-prompt a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.sam-switch-prompt a:hover {
    text-decoration: underline;
}

/* Alerts */
.sam-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.5;
}

.sam-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.sam-alert-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* ========================================================
   Student Smart Dashboard Navigation & Layout
   ======================================================== */
.sam-stu-tabs {
    display: flex;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: thin;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.sam-stu-tab-btn {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.sam-stu-tab-btn:hover {
    background: #f1f5f9;
    color: #1e3a8a;
}

.sam-stu-tab-btn.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.sam-stu-tab-pane {
    display: none;
    animation: samStuFade 0.25s ease-out;
}

.sam-stu-tab-pane.active {
    display: block;
}

@keyframes samStuFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================== */
/* TEACHER PORTAL TABS & PANES               */
/* ========================================== */
.sam-tea-tabs {
    display: flex;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: thin;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.sam-tea-tab-btn {
    flex: 1;
    min-width: 140px;
    padding: 11px 16px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    outline: none;
}

.sam-tea-tab-btn:hover {
    background: #f1f5f9;
    color: #065f46;
}

.sam-tea-tab-btn.active {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.25);
}

.sam-tea-tab-btn .sam-count-badge {
    background: #fef3c7;
    color: #b45309;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 12px;
    font-weight: 800;
}

.sam-tea-tab-btn.active .sam-count-badge {
    background: #ffffff;
    color: #065f46;
}

.sam-tea-tab-pane {
    display: none !important;
    animation: samTeaFade 0.25s ease-out;
}

.sam-tea-tab-pane.active {
    display: block !important;
}

@keyframes samTeaFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Tables */
.sam-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-top: 14px;
}

.sam-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
    background: #ffffff;
}

.sam-table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.sam-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.sam-table tr:hover td {
    background: #f8fafc;
}

/* Badges */
.sam-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}
.sam-badge-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.sam-badge-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.sam-badge-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.sam-badge-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Attendance Visual Grid */
.sam-att-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 16px;
}

@media (max-width: 640px) {
    .sam-att-calendar-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.sam-att-day-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    transition: transform 0.15s ease;
}
.sam-att-day-card:hover {
    transform: translateY(-2px);
}
.sam-att-day-card.present {
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.sam-att-day-card.absent {
    background: #fef2f2;
    border-color: #fecaca;
}
.sam-att-day-card.late {
    background: #fffbeb;
    border-color: #fde68a;
}
.sam-att-day-card.holiday {
    background: #f1f5f9;
    border-color: #cbd5e1;
    opacity: 0.75;
}

.sam-att-date-num {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    display: block;
}
.sam-att-status-text {
    font-size: 11px;
    font-weight: 700;
    margin-top: 4px;
    display: block;
}

/* Digital ID Card Modal */
.sam-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.sam-modal-box {
    background: #ffffff;
    border-radius: 18px;
    max-width: 460px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    animation: samModalIn 0.25s ease-out;
}

@keyframes samModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media print {
    body * {
        visibility: hidden !important;
    }
    #samPrintableArea, #samPrintableArea * {
        visibility: visible !important;
    }
    #samPrintableArea {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
    }
}

/* Explore Portal Services Section Completely Hidden */
.elementor-element-pt_sec_grid,
.elementor-element-pt_con_phead,
.elementor-element-pt_con_pgrid,
.elementor-element-pt_w_ph_tag,
.elementor-element-pt_w_ph_title,
[data-id="pt_sec_grid"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


