/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #000000 0%, #000000 100%);
    border-right: 2px solid #232323;
    transition: left 0.3s ease;
    z-index: 1060;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1055;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    min-height: 64px;
    padding: 1.5rem;
    border-bottom: 1px solid #232323;
    background-color: #212529;
    background-repeat: repeat-x;
    background-position: top left;
}

.sidebar-header .navbar-brand {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar-header .navbar-brand:hover {
    color: #a3a8d3;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #bfc7d5;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-menu-item:hover {
    background: rgba(163, 168, 211, 0.1);
    color: #fff;
    border-left-color: #a3a8d3;
}

.sidebar-menu-item.active {
    background: rgba(163, 168, 211, 0.15);
    color: #fff;
    border-left-color: #a3a8d3;
}

.sidebar-menu-item i {
    width: 1.5rem;
    margin-right: 0.75rem;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 0.75rem 0.75rem 0.5rem;
}

.sidebar-section-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6f7782;
    padding: 0.35rem 1rem 0.1rem;
}

.sidebar-recent-item {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.sidebar-menu-label {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-recent-meta {
    display: block;
    margin-left: 2.25rem;
    margin-top: 0.2rem;
    font-size: 0.76rem;
    color: #7f8896;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-section-empty {
    padding: 0.5rem 1.5rem;
    color: #7f8896;
    font-size: 0.85rem;
}

.menu-toggle {
    position: fixed;
    top: 0.2rem;
    left: 0.2rem;
    background: #000000;
    color: #ffffff;
    padding: 0.5rem;
    border-radius: 0px;
    cursor: pointer;
    z-index: 1065;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: #353535;
    color: #fff;
}

.main-content .navbar .container-fluid > :first-child {
    padding-left: 52px;
}

.main-content {
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

body {
    background-color: #000000;
    color: #e0e0e0;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    padding-bottom: 80px; /* Add padding to bottom so content is not hidden behind pinned bar */
}

.header-section {
    background: #000;
    color: #fff;
    padding: 0 0; /* <-- This adds top and bottom padding */
    margin-bottom: 0rem;
    border-radius: 0 0 15px 15px;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
}

.header-section h1 {
    font-weight: 300;
    font-size: 2.5rem;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    color: #fff;
}

.header-section img.img-fluid {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 300px;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

.nav-tabs {
    border-bottom: 2px solid #232323;
    background: #232323;
}

.nav-tabs .nav-link {
    color: #bfc7d5;
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    margin-right: 1rem;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: #a3a8d3;
    background: rgba(163, 168, 211, 0.1);
    color: #fff;
}

.nav-tabs .nav-link.active {
    color: #fff;
    border-bottom-color: #a3a8d3;
    background: rgba(163, 168, 211, 0.15);
}

.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    border-radius: 15px;
    background: #18191b;
    color: #e0e0e0;
    font-family: 'Roboto', Arial, Helvetica, sans-serif !important;
}

.card-header {
    background: linear-gradient(135deg, #232323 0%, #353535 100%);
    color: #fff;
    border-radius: 15px 15px 0 0 !important;
    border: none;
    padding: 1rem 1.5rem;
    font-family: 'Roboto', Arial, Helvetica, sans-serif !important;
}

.form-control {
    border: 2px solid #232323;
    border-radius: 8px;
    background: #111214;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #a3a8d3;
    box-shadow: 0 0 0 0.2rem rgba(163, 168, 211, 0.25);
    background: #18191b;
    color: #fff;
}

.form-check-input {
    background-color: #232323;
    border: 2px solid #353535;
}

.form-check-input:checked {
    background-color: #a3a8d3;
    border-color: #a3a8d3;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* UI elements remain colored */
.btn-primary {
    background: linear-gradient(135deg, #3a3f5c 0%, #a3a8d3 100%);
    border: none;
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #232946 0%, #a3a8d3 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(163, 168, 211, 0.3);
    color: #fff;
}

.btn-outline-primary {
    color: #a3a8d3;
    border-color: #a3a8d3;
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: #a3a8d3;
    border-color: #a3a8d3;
    color: #232946;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: #fff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1c9f85 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    color: #fff;
}

.btn-outline-secondary {
    color: #bfc7d5;
    border-color: #353535;
    background: transparent;
}

.btn-outline-secondary:hover {
    background-color: #353535;
    border-color: #353535;
    color: #fff;
}

.action-buttons {
    margin-top: 2rem;
    padding: 2rem 0;
    border-top: 2px solid #232323;
}

.alert-container {
    margin-bottom: 2rem;
}

.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    background: #232323;
    color: #fff;
}

.alert-success {
    background: linear-gradient(135deg, #2e7d32 0%, #388e3c 100%);
    color: #e0ffe0;
}

.alert-danger {
    background: linear-gradient(135deg, #b71c1c 0%, #f44336 100%);
    color: #fff0f0;
}

.empty-state {
    padding: 3rem 0;
    color: #bfc7d5;
    background: #18191b;
}

.empty-state i {
    opacity: 0.3;
    color: #a3a8d3;
}

.getting-started {
    margin-top: 2rem;
}

.list-group-item {
    border: none;
    background: rgba(163, 168, 211, 0.08);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border-left: 4px solid #a3a8d3;
    color: #e0e0e0;
}

.template-info {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(163, 168, 211, 0.1) 0%, rgba(58, 63, 92, 0.1) 100%);
    border-radius: 10px;
    border-left: 4px solid #a3a8d3;
    color: #e0e0e0;
}

.form-select {
    background-color: #111214;
    color: #e0e0e0;
    border: 2px solid #232323;
    border-radius: 8px;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-select:focus {
    border-color: #a3a8d3;
    box-shadow: 0 0 0 0.2rem rgba(163, 168, 211, 0.25);
    background-color: #18191b;
    color: #fff;
}

.form-select option {
    background-color: #111214;
    color: #e0e0e0;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 18, 20, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: #fff;
    font-size: 1.2rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: #a3a8d3 !important;
}

/* Pinned action bar at bottom */

.pinned-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: #18191b;
    border-top: 2px solid #232323;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.4);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.pinned-action-bar .container {
    max-width: 900px;
}
.pinned-action-bar .btn {
    /* Remove or adjust these lines if present: */
    /* min-width: 220px; */
    /* max-width: 320px; */
    /* font-size: 1.1rem; */

/* padding: 0.75rem 1.5rem; */
    /* Use default Bootstrap sizing */
    min-width: unset;
    max-width: unset;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
}
@media (max-width: 768px) {
    /* ...existing code... */
    .pinned-action-bar .btn {
        width: 100% !important;
        min-width: 0;
        margin-bottom: 0.5rem;
    }
}

/* Responsive: stack buttons on mobile */

@media (max-width: 768px) {
    .header-section h1 {
        font-size: 2rem;
    }
    
    .header-section img.img-fluid {
        max-width: 90vw;
        max-height: 160px;
        width: 100%;
        height: auto;
    }
    .header-section h1,
    .header-section .header-title {
        font-size: 1.5rem !important;
        text-align: center;
    }
    .header-section {
        padding: 1rem 0;
    }
    /* Top-left title hidden on mobile, shown in header-section */
    .container-fluid > .row > .col-12 > div[style*="position: absolute"] {
        display: none !important;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    .pinned-action-bar {
        padding-bottom: 70px;
    }
}

/* Animation effects */

.card {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status display */
#status-display {
    margin-bottom: 1rem;
    border-radius: 10px;
    border: none;
    background: #232323;
    color: #fff;
}

#status-display.alert-success {
    background: linear-gradient(135deg, #2e7d32 0%, #388e3c 100%);
    color: #e0ffe0;
}

#status-display.alert-danger {
    background: linear-gradient(135deg, #b71c1c 0%, #f44336 100%);
    color: #fff0f0;
}

#status-display.alert-info {
    background: linear-gradient(135deg, #232323 0%, #353535 100%);
    color: #a3a8d3;
}

/* Auto-lock visual feedback */
.form-check.bg-warning {
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
    background: #bfa700 !important;
    color: #232323 !important;
}

.form-check.bg-info {
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
    background: #1976d2 !important;
    color: #fff !important;
}

/* Lock indicator animation */

.form-check-input:checked + .form-check-label i {
    color: #a3a8d3;
    animation: lockPulse 0.5s ease-in-out;
}

@keyframes lockPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Auto-lock notification styles */
.alert-info.auto-lock {
    background: linear-gradient(135deg, #232323 0%, #353535 100%);
    color: #a3a8d3;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Roboto font variations */

.roboto-thin {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 100;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

.roboto-light {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

.roboto-regular {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

.roboto-medium {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

.roboto-bold {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

.roboto-black {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 900;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

/* Italic variations */
.roboto-light-italic {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: italic;
  font-variation-settings: "wdth" 100;
}

.roboto-regular-italic {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: italic;
  font-variation-settings: "wdth" 100;
}

.roboto-bold-italic {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: italic;
  font-variation-settings: "wdth" 100;
}




/* File Manager Styles */