/* CSS/admin-instructions.css */
/* Admin Instructions Page Styles */
/* Main Container */
.instructions-main {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    min-height: 100vh;
    padding: 20px 0 40px;
    color: #ffffff;
}

.instructions-main .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Section */
.instructions-header {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 30px 0;
    border-bottom: 2px solid rgba(122, 71, 255, 0.3);
}

.instructions-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #7a47ff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.instructions-subtitle {
    font-size: 1.2rem;
    color: #b8bcc8;
    margin: 0;
    font-weight: 300;
}

/* Table of Contents */
.toc-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid rgba(122, 71, 255, 0.2);
}

.toc-section h2 {
    color: #7a47ff;
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-align: center;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.toc-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: rgba(122, 71, 255, 0.1);
    border: 1px solid rgba(122, 71, 255, 0.3);
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.toc-item:hover {
    background: rgba(122, 71, 255, 0.2);
    border-color: #7a47ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 71, 255, 0.3);
    text-decoration: none;
    color: #ffffff;
}

.toc-item.active {
    background: rgba(122, 71, 255, 0.3);
    border-color: #7a47ff;
}

.toc-item i {
    font-size: 1.5rem;
    margin-right: 12px;
    color: #7a47ff;
    min-width: 24px;
}

.toc-item span {
    font-weight: 500;
    font-size: 1rem;
}

/* Instruction Sections */
.instruction-section {
    margin-bottom: 50px;
    scroll-margin-top: 100px;
}

.section-header {
    margin-bottom: 30px;
    text-align: center;
    padding: 20px;
    background: rgba(122, 71, 255, 0.1);
    border-radius: 10px;
}

.section-header h2 {
    color: #7a47ff;
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-header p {
    color: #b8bcc8;
    margin: 0;
    font-size: 1.1rem;
}

/* Instruction Cards */
.instruction-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.instruction-card h3 {
    color: #7a47ff;
    font-size: 1.4rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.instruction-card h3 i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Step Lists */
.step-list {
    margin: 20px 0;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #7a47ff;
}

.step-number {
    background: #7a47ff;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-content {
    flex: 1;
    line-height: 1.6;
}

.step-content strong {
    color: #ffffff;
    display: block;
    margin-bottom: 5px;
}

.step-content ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.step-content li {
    margin-bottom: 5px;
    color: #b8bcc8;
}

/* Info Lists */
.info-list,
.task-list,
.security-list,
.performance-list {
    margin: 20px 0;
}

.info-item,
.task-item,
.security-item,
.performance-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.info-item i,
.task-item i,
.security-item i,
.performance-item i {
    margin-right: 12px;
    margin-top: 2px;
    font-size: 1.1rem;
    color: #7a47ff;
    min-width: 20px;
}

.info-item div,
.task-item div,
.security-item div,
.performance-item div {
    flex: 1;
    line-height: 1.5;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 5px;
}

.badge.all {
    background: rgba(108, 117, 125, 0.3);
    color: #ffffff;
}

.badge.pending {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.badge.approved {
    background: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.badge.cancelled {
    background: rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

/* Alert Boxes */
.warning-box,
.tip-box,
.info-box,
.security-box {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
}

.warning-box {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.tip-box {
    background: rgba(23, 162, 184, 0.1);
    border-left-color: #17a2b8;
}

.info-box {
    background: rgba(0, 123, 255, 0.1);
    border-left-color: #007bff;
}

.security-box {
    background: rgba(40, 167, 69, 0.1);
    border-left-color: #28a745;
}

.warning-box i,
.tip-box i,
.info-box i,
.security-box i {
    margin-right: 10px;
    margin-top: 2px;
    font-size: 1.2rem;
}

.warning-box i {
    color: #ffc107;
}

.tip-box i {
    color: #17a2b8;
}

.info-box i {
    color: #007bff;
}

.security-box i {
    color: #28a745;
}

/* Text Colors */
.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.text-warning {
    color: #ffc107;
}

/* Help Section */
.help-section {
    background: rgba(122, 71, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    border: 1px solid rgba(122, 71, 255, 0.3);
}

.help-section h3 {
    color: #7a47ff;
    margin-bottom: 15px;
}

.help-options {
    margin-top: 20px;
}

.help-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.help-option i {
    margin-right: 12px;
    color: #7a47ff;
    font-size: 1.1rem;
    min-width: 20px;
}

/* Quick Access Footer */
.quick-access-footer {
    background: rgba(122, 71, 255, 0.15);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-top: 40px;
    border: 2px solid rgba(122, 71, 255, 0.3);
}

.quick-access-footer h3 {
    color: #7a47ff;
    margin-bottom: 20px;
}

.quick-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.quick-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: #7a47ff;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: #6c42db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 71, 255, 0.4);
    text-decoration: none;
    color: white;
}

.quick-btn i {
    margin-right: 8px;
}

.main-footer,
.footer-row,
.footer-center,
.powered-by {
    text-align: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .instructions-main {
        padding: 15px 0 30px;
    }

    .instructions-main .container {
        padding: 0 15px;
    }

    .instructions-header h1 {
        font-size: 2rem;
    }

    .instructions-header {
        margin-top: 75px;
    }

    .instructions-subtitle {
        font-size: 1rem;
    }

    .toc-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .toc-item {
        padding: 12px 15px;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .instruction-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .instruction-card h3 {
        font-size: 1.2rem;
    }

    .step {
        padding: 12px;
        margin-bottom: 15px;
    }

    .step-number {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
        margin-right: 12px;
    }

    .quick-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .quick-btn {
        width: 200px;
        justify-content: center;
    }

    .toc-section,
    .instruction-card,
    .help-section,
    .quick-access-footer {
        padding: 20px;
    }
}

/* Extra Mobile-Specific Responsive Design */
@media (max-width: 768px) {
    .instructions-main {
        padding: 10px 0 20px;
    }

    .instructions-main .container {
        padding: 0 8px;
    }

    .instructions-header h1 {
        font-size: 1.6rem;
    }

    .instructions-header {
        margin-top: 80px; /* Increased to account for toggle button */
        padding: 18px 0;
    }

    .instructions-subtitle {
        font-size: 0.95rem;
    }

    .toc-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .toc-item {
        padding: 10px 10px;
    }

    .section-header h2 {
        font-size: 1.2rem;
    }

    .instruction-card {
        padding: 12px;
        margin-bottom: 14px;
    }

    .instruction-card h3 {
        font-size: 1rem;
    }

    .step {
        padding: 8px;
        margin-bottom: 10px;
    }

    .step-number {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
        margin-right: 8px;
    }

    .quick-buttons {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .quick-btn {
        width: 150px;
        justify-content: center;
        font-size: 0.95rem;
    }

    .toc-section,
    .instruction-card,
    .help-section,
    .quick-access-footer {
        padding: 12px;
    }
    
    /* Mobile-specific toggle button adjustments */
    .toc-toggle-btn {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .toc-sidebar {
        width: 280px;
        left: -300px;
        padding: 70px 15px 15px 15px;
    }
    
    .toc-sidebar h2 {
        font-size: 1.2rem;
    }
    
    .toc-sidebar .toc-item {
        font-size: 0.95rem;
        padding: 10px 12px;
    }
}

@media (min-width: 820px) {
    .instructions-header {
        margin-top: 50px;
    }

    .instructions-header h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .instructions-header {
        padding: 20px 0;
    }

    .instructions-header h1 {
        font-size: 1.8rem;
    }

    .toc-item span {
        font-size: 0.9rem;
    }

    .section-header {
        padding: 15px;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .instruction-card h3 {
        font-size: 1.1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .step-content strong {
        font-size: 0.95rem;
    }
    /*====================================*/
    /* Very small screen adjustments */
    .toc-toggle-btn {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .toc-sidebar {
        width: 260px;
        left: -280px;
        padding: 60px 12px 12px 12px;
    }
    
    .toc-sidebar h2 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .toc-sidebar .toc-item {
        font-size: 0.9rem;
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    
    .toc-sidebar .toc-item i {
        font-size: 1rem;
        margin-right: 10px;
        min-width: 20px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .toc-sidebar,
    .toc-overlay,
    .toc-toggle-btn {
        transition: none;
    }
    
    .toc-sidebar .toc-item {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .toc-toggle-btn {
        border: 2px solid currentColor;
    }
    
    .toc-sidebar {
        border: 2px solid currentColor;
    }
    
    .toc-sidebar .toc-item {
        border: 1px solid currentColor;
    }
}

/* Focus visible improvements for better keyboard navigation */
.toc-toggle-btn:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.toc-sidebar .toc-item:focus-visible {
    outline: 2px solid #7a47ff;
    outline-offset: 2px;
}
/*===================================*/
/* Print Styles */
@media print {
    .instructions-main {
        background: white;
        color: black;
    }

    .toc-item,
    .instruction-card,
    .help-section {
        background: white;
        border: 1px solid #ddd;
    }

    .section-header,
    .quick-access-footer {
        background: #f8f9fa;
    }

    .step {
        background: #f8f9fa;
    }

    .quick-access-footer {
        display: none;
    }

    header,
    footer {
        display: none;
    }
}


/* Sidebar TOC styles */
.instructions-layout {
    display: flex;
    align-items: flex-start;
}

.toc-sidebar {
    position: fixed;
    top: 77px;
    left: 0;
    width: 230px;
    min-height: 300px;
    max-height: 73vh;
    overflow-y: auto;
    background: rgba(26, 26, 46, 0.98);
    border-right: 1.5px solid rgba(122, 71, 255, 0.15);
    border-radius: 0 16px 16px 0;
    z-index: 1;
    padding: 15px 12px 15px 18px;
    box-shadow: 2px 0 16px 0 rgba(122, 71, 255, 0.07);
    margin-right: 30px;
    transition: left 0.3s;
}

.toc-sidebar h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #7a47ff;
    text-align: left;
}

.toc-sidebar .toc-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-sidebar .toc-item {
    font-size: 0.98em;
    padding: 8px 10px;
    border-radius: 6px;
    margin: 0;
    background: none;
    border: none;
    color: #b8bcc8;
    transition: background 0.2s, color 0.2s;
}

.toc-sidebar .toc-item.active,
.toc-sidebar .toc-item:hover {
    background: rgba(122, 71, 255, 0.13);
    color: #fff;
}

.toc-sidebar .toc-item i {
    font-size: 1em;
    margin-right: 8px;
    color: #7a47ff;
}

/* Main content shifts right for sidebar */
.instructions-main .container {
    margin-left: 260px;
    max-width: 950px;
}

/* Mobile TOC Toggle Button - Only created on admin-instructions page via JS */
.toc-toggle-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
    background: linear-gradient(135deg, #7a47ff 0%, #6c42db 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 16px rgba(122, 71, 255, 0.3);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.toc-toggle-btn:hover {
    background: linear-gradient(135deg, #6c42db 0%, #5a37c4 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(122, 71, 255, 0.4);
}

.toc-toggle-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.toc-toggle-btn.active {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.toc-toggle-btn.active:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

/* Mobile overlay for sidebar */
.toc-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toc-overlay.active {
    opacity: 1;
}

/* Hide toggle button on desktop */
@media (min-width: 1025px) {
    .toc-toggle-btn {
        display: none !important;
    }
}

/* Modified sidebar for mobile */
@media (max-width: 1024px) {
    .toc-toggle-btn {
        display: flex;
    }
    
    .toc-sidebar {
        position: fixed;
        top: 0;
        left: -345px;
        width: 300px;
        height: 100vh;
        max-height: none;
        overflow-y: auto;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(10px);
        border-right: 2px solid rgba(122, 71, 255, 0.2);
        border-radius: 0 16px 16px 0;
        z-index: 1001;
        padding: 80px 15px 20px 15px;
        box-shadow: 4px 0 20px rgba(122, 71, 255, 0.15);
        transition: left 0.3s ease;
    }
    
    .toc-sidebar.mobile-open {
        left: 0;
    }
    
    .toc-sidebar h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
        text-align: center;
        padding-bottom: 15px;
        border-bottom: 2px solid rgba(122, 71, 255, 0.3);
    }
    
    .toc-sidebar .toc-item {
        font-size: 1rem;
        padding: 12px 15px;
        margin-bottom: 8px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(122, 71, 255, 0.2);
        transition: all 0.3s ease;
    }
    
    .toc-sidebar .toc-item:hover,
    .toc-sidebar .toc-item.active {
        background: rgba(122, 71, 255, 0.2);
        border-color: #7a47ff;
        transform: translateX(5px);
    }
    
    .toc-sidebar .toc-item i {
        font-size: 1.1rem;
        margin-right: 12px;
        color: #7a47ff;
        min-width: 24px;
    }

    .instructions-main .container {
        margin-left: 0;
        max-width: 100%;
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .toc-toggle-btn {
        top: 25px;
        right: 25px;
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .toc-sidebar {
        width: 320px;
        left: -340px;
        padding: 90px 15px 25px 15px;
    }
    
    .toc-sidebar .toc-item {
        font-size: 1.1rem;
        padding: 14px 18px;
    }
}

/* Hide original TOC section in main content */
.toc-section {
    display: none !important;
}

/* Scroll to Top button styles */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 32px;
    right: 24px;
    z-index: 999;
    background: linear-gradient(135deg, #7a47ff 60%, #1a1a2e 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 4px 16px rgba(122, 71, 255, 0.18);
    font-size: 1.5rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

#astra-scroll-top,
.ast-scroll-top,
#scroll-top,
.scroll-to-top,
.scroll-top,
.ast-scroll-top-icon,
.ast-scroll-to-top-right,
.ast-icon,
.icon-arrow,
.ast-arrow-svg {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

#scrollTopBtn:focus {
    outline: 2px solid #fff;
}

#scrollTopBtn:hover {
    background: #6c42db;
}

@media (min-width: 1025px) {
    #scrollTopBtn {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    #scrollTopBtn {
        display: flex;
    }
}