/* ═══════════════════════════════════════════
   Shree Krishna Multitasking Trust Custom CSS
   ═══════════════════════════════════════════ */

:root {
    --font-sans: 'Instrument Sans', 'Inter', sans-serif;
    --primary: #f53003;
    --primary-hover: #d22600;
    --bg-light: #fbfbfa;
    --card-light: #ffffff;
    --text-light: #1b1b18;
    --text-muted-light: #706f6c;
    --border-light: #e3e3e0;
    
    --bg-dark: #0a0a0a;
    --card-dark: #161615;
    --text-dark: #ededec;
    --text-muted-dark: #a1a09a;
    --border-dark: #3e3e3a;
}

body {
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-light);
    transition: background-color 0.3s, color 0.3s;
}

/* Glassmorphism & Cards */
.card {
    background-color: var(--card-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}
.card-pad {
    padding: 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.btn-primary {
    background-color: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}
.btn-outline {
    background-color: transparent;
    border-color: var(--border-light);
    color: var(--text-light);
}
.btn-outline:hover {
    background-color: rgba(0, 0, 0, 0.03);
    border-color: var(--text-muted-light);
}
.btn-danger {
    background-color: #dc2626;
    color: #fff;
}
.btn-danger:hover {
    background-color: #b91c1c;
}
.btn-success {
    background-color: #166534;
    color: #fff;
}
.btn-success:hover {
    background-color: #14532d;
}

/* Dashboard Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    min-width: 260px;
    background-color: #111;
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 200;
    transition: transform 0.3s ease;
}

/* Thin scrollbar inside sidebar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 199;
}
.sidebar-overlay.show {
    display: block;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}
.sidebar-brand i {
    color: var(--primary);
    font-size: 24px;
}
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}
.sidebar-item {
    margin-bottom: 8px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: #a1a09a;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.sidebar-link:hover, .sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.07);
    color: #fff;
}
.sidebar-link.active i {
    color: var(--primary);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-light);
    overflow-x: hidden;
    margin-left: 260px;
    min-width: 0;
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;
    background-color: var(--card-light);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}
.topbar-title {
    font-size: 20px;
    font-weight: 600;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}
.topbar-user-name {
    font-weight: 500;
}

.content-body {
    padding: 30px;
    flex-grow: 1;
}

/* Mobile Toggles */
.menu-toggle {
    display: none;
    font-size: 22px;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
}

/* Grid System */
.grid {
    display: grid;
    gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Stats widgets */
.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.stat-icon.red { background-color: rgba(245, 48, 3, 0.1); color: var(--primary); }
.stat-icon.blue { background-color: rgba(30, 144, 255, 0.1); color: #1e90ff; }
.stat-icon.green { background-color: rgba(22, 101, 52, 0.1); color: #166534; }
.stat-icon.orange { background-color: rgba(232, 101, 26, 0.1); color: #e8651a; }

.stat-details strong {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}
.stat-details span {
    color: var(--text-muted-light);
    font-size: 13px;
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-active { background-color: #dcfce7; color: #166534; }
.badge-pending { background-color: #fef3c7; color: #d97706; }
.badge-inactive { background-color: #fee2e2; color: #991b1b; }
.badge-blue { background-color: #dbeafe; color: #1e40af; }

/* Table styling */
.table-wrap {
    overflow-x: auto;
    margin-top: 15px;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
th {
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-light);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted-light);
}
td {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    vertical-align: middle;
}
tr:hover td {
    background-color: rgba(0, 0, 0, 0.01);
}

.table-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 300px;
    width: 100%;
}
.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted-light);
}
.search-box input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field.full {
    grid-column: span 2;
}
.field label {
    font-weight: 500;
    font-size: 13px;
}
.field input, .field select, .field textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background-color: var(--card-light);
    color: inherit;
    font-family: inherit;
}
.field textarea {
    resize: vertical;
    min-height: 80px;
}
.required {
    color: var(--primary);
}

/* Public Welcome Page Styles */
.public-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 40px;
    background-color: var(--card-light);
    border-bottom: 1px solid var(--border-light);
}
.public-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}
.public-brand h2 {
    margin: 0;
    font-size: 18px;
}
.public-brand span {
    color: var(--primary);
}
.public-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}
.public-link {
    text-decoration: none;
    font-weight: 500;
    color: var(--text-muted-light);
    transition: color 0.2s;
}
.public-link:hover {
    color: var(--text-light);
}

/* Public Apply Page Choose Type Cards */
.type-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.type-card {
    border: 2px dashed var(--border-light);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.type-card i {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--text-muted-light);
}
.type-card h3 {
    margin-bottom: 8px;
}
.type-card p {
    font-size: 12px;
    color: var(--text-muted-light);
    margin: 0;
}
.type-card.selected {
    border-color: var(--primary);
    background-color: rgba(245, 48, 3, 0.02);
}
.type-card.selected i {
    color: var(--primary);
}

/* Payment Box Details */
.payment-box {
    display: flex;
    gap: 24px;
    padding: 20px;
    background-color: #fcf8e3;
    border: 1px solid #faebcc;
    border-radius: 12px;
    color: #8a6d3b;
    margin-bottom: 24px;
    align-items: center;
}
.qr-holder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}
.qr-holder canvas {
    width: 150px;
    height: 150px;
}
.upi {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    background-color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid #ddd;
    margin: 5px 0;
}

/* Modal dialog */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal.show {
    opacity: 1;
    pointer-events: auto;
}
.modal-box {
    background-color: var(--card-light);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}
.modal-lg {
    max-width: 800px;
}
.modal-sm {
    max-width: 450px;
}
.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}
.modal-body {
    padding: 20px;
    overflow-y: auto;
}
.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-light);
}
.close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted-light);
}

/* Question management */
.question-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}
.qtop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Video rows editing */
.dynamic-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.dynamic-row input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
}
.remove-row {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 16px;
}

/* Action button items */
.actions {
    display: flex;
    gap: 8px;
}
.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: none;
}
.icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Notice board card */
.notice-card {
    border-left: 4px solid var(--primary);
}
.notice-card h4 {
    margin-bottom: 4px;
}
.notice-card .date {
    font-size: 11px;
    color: var(--text-muted-light);
    margin-bottom: 10px;
}

/* Rich text tool */
.rich-toolbar {
    display: flex;
    gap: 5px;
    background-color: #f3f3f2;
    padding: 6px;
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--border-light);
    border-bottom: none;
}
.rich-toolbar button {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
}
.rich-editor {
    min-height: 120px;
    border: 1px solid var(--border-light);
    border-radius: 0 0 8px 8px;
    padding: 12px;
    outline: none;
    background-color: #fff;
}

/* Certificate details */
.certificate-wrap {
    background-color: #f3f3f2;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.certificate {
    background-color: #fff;
    padding: 40px;
    border-radius: 4px;
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    color: #111;
}
.cert-border {
    border: 15px double #cf9f4c;
    padding: 30px;
    height: 100%;
    box-sizing: border-box;
}
.cert-brand {
    text-align: center;
    margin-bottom: 30px;
}
.cert-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}
.cert-logo .krishna {
    color: #cf9f4c;
    font-size: 32px;
}
.cert-logo h2 {
    font-size: 24px;
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 1px;
}
.cert-logo h2 span {
    display: block;
    font-size: 11px;
    color: #777;
    letter-spacing: 3px;
    font-weight: 500;
}
.cert-org {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #222;
    margin-top: 10px;
}
.cert-address {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
}
.cert-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    color: #cf9f4c;
    letter-spacing: 2px;
    margin: 30px 0;
    line-height: 1.3;
}
.cert-body {
    font-size: 14px;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 30px;
}
.grade-box {
    border: 2px solid #cf9f4c;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: 700;
    display: inline-block;
    margin: 20px auto;
    text-align: center;
    border-radius: 6px;
}
.cert-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 40px;
}
.seal {
    border: 2px dashed #999;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    color: #999;
    line-height: 1.2;
}
.signature {
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 8px;
    font-size: 12px;
    text-align: left;
    width: 250px;
}
.qr-cert {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.qr-cert canvas {
    width: 85px;
    height: 85px;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}
.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted-light);
}
.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}

/* Info Alert */
.info-note {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

/* Student dashboard verification pending screen */
.lock-screen {
    background-color: #fff2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 24px;
}
.lock-screen i {
    font-size: 48px;
    margin-bottom: 16px;
}
.lock-screen h2 {
    margin-bottom: 8px;
}

/* responsive media queries */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-260px);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .grid-4, .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .field.full {
        grid-column: span 1;
    }
    .type-choice {
        grid-template-columns: 1fr;
    }
    .payment-box {
        flex-direction: column;
        text-align: center;
    }
    .cert-bottom {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .topbar {
        padding: 0 15px;
    }
    .content-body {
        padding: 15px;
    }
}
