/*
 * DECAS Admin Module Styles
 * Module-specific styles for connected devices, hostel, transport,
 * admission, and other admin-only pages
 */

/* ============================================
   CONNECTED DEVICES
   ============================================ */
.activation-code-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}
.activation-code-display {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #0F2D5C;
    font-family: monospace;
}
.device-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
}
.device-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.device-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.device-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.device-status.online { background: #28a745; }
.device-status.offline { background: #dc3545; }
.device-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

/* ============================================
   HOSTEL MANAGEMENT
   ============================================ */
.hostel-room-card {
    border-radius: 10px;
    padding: 1rem;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}
.hostel-room-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.room-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.occupancy-bar {
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    overflow: hidden;
}
.occupancy-bar .bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ============================================
   TRANSPORT
   ============================================ */
.route-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 0.75rem;
}

/* ============================================
   ADMISSION
   ============================================ */
.application-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
}
.application-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
.application-status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   EXAM MONITOR
   ============================================ */
.monitor-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    height: 100%;
}
.monitor-stat {
    text-align: center;
    padding: 0.75rem;
}
.monitor-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F2D5C;
}
.monitor-stat .label {
    font-size: 0.8rem;
    color: #7f8c8d;
}
.student-monitor-item {
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.monitor-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.monitor-status-dot.active { background: #28a745; }
.monitor-status-dot.idle { background: #F4B400; }
.monitor-status-dot.disconnected { background: #dc3545; }

/* ============================================
   LEAVE MANAGEMENT
   ============================================ */
.leave-type-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
    transition: all 0.3s ease;
}
.leave-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.leave-balance {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0F2D5C;
}

/* ============================================
   OUTSTANDING FEES
   ============================================ */
.fee-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    height: 100%;
}
.fee-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F2D5C;
}
.fee-label {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* ============================================
   PAYMENT APPROVALS
   ============================================ */
.approval-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 0.75rem;
    border-left: 4px solid #F4B400;
}
.approval-card.approved {
    border-left-color: #28a745;
}
.approval-card.rejected {
    border-left-color: #dc3545;
}

/* ============================================
   BRANCHES
   ============================================ */
.archive {
    font-size: 50px;
    color: #bf0808;
}
.restore {
    font-size: 50px;
    color: #1ABE17 !important;
}

/* ============================================
   CA SCORES
   ============================================ */
.filter-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}
.score-input {
    width: 80px;
    text-align: center;
    padding: 4px 6px;
    font-size: 0.9rem;
}
.score-input:focus {
    border-color: #0F2D5C;
    box-shadow: 0 0 0 0.15rem rgba(15, 45, 92, 0.25);
}
.score-input.changed {
    background-color: #fff3cd;
}
.total-cell {
    font-weight: 700;
    color: #0F2D5C;
    font-size: 1rem;
}
.grade-cell {
    font-weight: 600;
}
#scoresTable th {
    white-space: nowrap;
    font-size: 0.85rem;
}
.action-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 2px solid #e9ecef;
    padding: 12px 20px;
    z-index: 10;
}

/* ============================================
   COMPANY DETAILS
   ============================================ */
.company-card {
    position: relative;
    padding-top: 20px;
}
.company-card img {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* ============================================
   COURSE LIBRARY
   ============================================ */
.overlay {
    top: 0;
    left: 0;
    z-index: 1;
}
.card-img-top {
    position: relative;
}
.overlay span {
    display: inline-block;
    border-radius: 5px;
}
.check {
    width: 20px;
    height: 20px;
}

/* ============================================
   DASHBOARD BACKUP
   ============================================ */
.analytics-card {
    background: linear-gradient(135deg, #0F2D5C 0%, #163D7A 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(15, 45, 92, 0.3);
}
.metric-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.performance-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
}
.trend-up {
    color: #28a745;
}
.trend-down {
    color: #dc3545;
}
.data-table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.data-table th {
    background: linear-gradient(135deg, #0F2D5C 0%, #163D7A 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}
.data-table td {
    padding: 1rem;
    vertical-align: middle;
}
.score-badge {
    display: inline-flex;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}
.score-excellent { background: linear-gradient(135deg, #28a745, #20c997); }
.score-good { background: linear-gradient(135deg, #007bff, #0056b3); }
.score-average { background: linear-gradient(135deg, #ffc107, #e0a800); }
.score-poor { background: linear-gradient(135deg, #dc3545, #c82333); }

/* ============================================
   DISCIPLINE STUDENT REPORT
   ============================================ */
.student-dropdown {
    position: absolute;
    z-index: 1055;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
}
.student-dropdown .dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}
.student-dropdown .dropdown-item:hover {
    background: #f0f0f0;
}
.student-dropdown .dropdown-item small {
    color: #888;
}
@media print {
    .no-print { display: none !important; }
    .card { border: none !important; box-shadow: none !important; }
}

/* ============================================
   LIBRARY LOANS
   ============================================ */
.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}
.search-result-item:hover {
    background-color: #f8f9fa;
}
.search-result-item:last-child {
    border-bottom: none;
}
.selection-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 4px;
}
.selection-badge .remove-selection {
    cursor: pointer;
    font-weight: bold;
    color: #dc3545;
}

/* ============================================
   LICENSE MANAGER
   ============================================ */
.stat-card {
    border-radius: 10px;
    transition: all 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.status-badge {
    font-size: 11px;
    padding: 4px 8px;
}
.device-count {
    font-size: 13px;
    font-weight: 600;
}
.log-table {
    font-size: 12px;
}
.log-table td {
    vertical-align: middle;
}
.code-wrap {
    font-family: monospace;
    font-size: 11px;
    word-break: break-all;
    white-space: normal;
    max-width: 100%;
    display: inline-block;
}
#licenseDetails .device-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #f8f9fa;
}
#licenseDetails .device-card:last-child {
    margin-bottom: 0;
}
#licenseDetails .device-card .device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.device-info-table {
    font-size: 12px;
    margin-bottom: 0;
}
.device-info-table th {
    width: 100px;
    font-weight: 500;
    color: #6c757d;
}
.device-info-table td {
    word-break: break-all;
}

/* ============================================
   MANAGE PLANS & PERMISSIONS / PLAN MANAGEMENT
   ============================================ */
.info-tooltip {
    border-radius: 100%;
    border: 1px solid #ccc;
    padding: 7px;
    font-size: 12px;
}

/* ============================================
   MEMBERSHIP TRANSACTIONS (BILLING)
   ============================================ */
.credit-card {
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 50%, #207cca 100%);
    color: #fff;
    border-radius: 10px;
    padding: 20px;
    max-width: 350px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
}
.credit-card .card-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.credit-card .card-number {
    font-size: 1.3em;
    letter-spacing: 3px;
    margin-bottom: 10px;
}
.credit-card .card-holder,
.credit-card .expiry {
    font-size: 0.9em;
}
.card-logo-img {
    width: 40px;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

/* ============================================
   OFFLINE VERSION MANAGER
   ============================================ */
.version-card {
    transition: all 0.3s ease;
}
.version-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.dropzone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.dropzone:hover,
.dropzone.dragover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}
.dropzone.uploading {
    border-color: #198754;
    background-color: #d1e7dd;
}
.file-list {
    max-height: 200px;
    overflow-y: auto;
}
.manifest-editor {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* ============================================
   OLD EXAM LOG (EXAM MANAGEMENT)
   ============================================ */
.exam-stats-card {
    border: none;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border-radius: 12px;
    transition: transform 0.2s ease;
}
.exam-stats-card:hover {
    transform: translateY(-2px);
}
.tab-content .card {
    border: none;
    box-shadow: 0 4px 25px rgba(0,0,0,0.1);
    border-radius: 15px;
}
.nav-tabs-enhanced {
    border-bottom: 2px solid #f8f9fa;
    padding: 0 0rem;
    margin-bottom: 10px !important;
    background: white;
    border-radius: 15px 15px 0 0;
}
.nav-tabs-enhanced .nav-link {
    border: none;
    padding: 1rem 1.5rem;
    margin: 0 0.25rem;
    border-radius: 10px 10px 0 0;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}
.nav-tabs-enhanced .nav-link.active {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-primary-rgb) 100%);
    color: black;
    transform: translateY(-2px);
    border-bottom: 2px solid black;
    border-radius: 10px;
}
.filter-row {
    gap: 1rem;
}
.filter-group {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.quick-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.quick-filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: white;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
}
.quick-filter-btn.active {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}
.exam-table .table th {
    background: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #495057;
    padding: 1rem;
}
.exam-table .table td {
    padding: 1rem;
    border-color: #f1f3f4;
}
.exam-status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.action-buttons {
    display: flex;
    gap: 0.5rem;
}
.action-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.2s ease;
}
.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.nav-item {
    margin-inline-end: 0rem;
}

/* ============================================
   QR ATTENDANCE
   ============================================ */
#reader {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
#reader video {
    border-radius: 8px;
}
.scan-result-card {
    border-left: 4px solid #28a745;
    background: #f8fff8;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.scan-result-card.duplicate {
    border-left-color: #ffc107;
    background: #fffdf0;
}
.scan-result-card .scan-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}
.scan-count-badge {
    font-size: 2rem;
    font-weight: bold;
}

/* ============================================
   TIMETABLE
   ============================================ */
.timetable-grid th,
.timetable-grid td {
    text-align: center;
    vertical-align: middle;
    min-width: 160px;
    padding: 8px;
}
.timetable-grid th.period-col {
    min-width: 120px;
}
.timetable-grid .break-cell {
    background-color: #fff3cd;
    font-weight: 600;
    color: #856404;
}
.timetable-grid select {
    font-size: 0.85rem;
    margin-bottom: 4px;
}
.timetable-grid input[type="text"] {
    font-size: 0.85rem;
}
.conflict-warning {
    color: #dc3545;
    font-size: 0.75rem;
    display: block;
    margin-top: 2px;
}

/* ============================================
   TRANSPORT ASSIGNMENTS
   ============================================ */
.selected-student-card {
    background: #f0f9ff;
    border: 1px solid #b3d9ff;
    border-radius: 0.375rem;
    padding: 0.75rem;
}

/* ============================================
   VIEW REPORT CARD
   ============================================ */
.report-card-container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.school-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px double #333;
}
.school-header img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}
.school-header h3 {
    margin-bottom: 5px;
    font-weight: 700;
    text-transform: uppercase;
}
.school-header p {
    margin-bottom: 0;
    color: #555;
    font-style: italic;
}
.student-info-table td {
    padding: 6px 15px;
    border: none !important;
}
.student-info-table td:first-child {
    font-weight: 600;
    color: #555;
    width: 140px;
}
.subject-table thead th {
    background: #f1f3f5;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.summary-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
}
.summary-section h6 {
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}
.remarks-section {
    margin-top: 25px;
}
.remarks-section .remark-box {
    background: #f8f9fa;
    border-left: 4px solid #0F2D5C;
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0;
}
.remarks-section .remark-box label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
@media print {
    .sidebar, .header, .page-header, .btn, .breadcrumb, .no-print {
        display: none !important;
    }
    .page-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }
    .content {
        padding: 0 !important;
    }
    .report-card-container {
        box-shadow: none;
        padding: 20px;
        max-width: 100%;
    }
}

/* ============================================
   CONNECTED DEVICES - ADDITIONAL SELECTORS
   ============================================ */
.device-card img {
    height: 180px;
    object-fit: cover;
}
.device-info {
    padding: 1.5rem;
}
.device-info-item:last-child {
    border-bottom: none;
}
.device-info-label {
    font-weight: 600;
    color: #6c757d;
    min-width: 120px;
}
.device-info-value {
    color: #212529;
}
.empty-state-icon {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}
.masked-id {
    font-family: monospace;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
.code-display {
    font-family: monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0F2D5C;
    letter-spacing: 2px;
}

/* ============================================
   CKE EDITOR (Set Question)
   ============================================ */
.cke_editor {
    width: 100% !important;
}

/* ============================================
   RECRUITMENT
   ============================================ */
.job-card {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 30px;
}
.job-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.job-image {
    position: relative;
}
.job-image img {
    width: 100%;
    height: 200px;
}
.job-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}
.job-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}
.job-details {
    font-size: 14px;
    color: #666;
    height: 40px;
}
.job-location,
.job-experience {
    display: inline-block;
    margin-right: 5px;
}
.job-date {
    font-size: 14px;
    color: #999;
}
.initial {
    border-radius: 45% !important;
    background-color: #3b4a4cc4 !important;
    border: 1px solid #3b4a4cc4 !important;
    font-size: 20px !important;
}
.recruitment-wrapper ol {
    list-style: number;
    padding-left: 2rem !important;
}
