/* GLOBAL VARIABLES */
:root {
    --hyperlake: #3D7DD6;
    --vault-gold: #E49A21;
    --vault-gold-hover: #d18a1a;
    --vault-gold-hover-rgb: rgba(228, 154, 33, 0.5);
    --vault-gold-disabled: #9c6f1a;
    --ledger: #F7EEDF;
    --slate: #1E3643;
    --nova: #5D5FEF;
    --nova-hover: #4A4DCC;
    --nova-hover-rgb: rgba(93, 95, 239, 0.3);
    --nova-light: #E8E9FD;
    --emberline: #D64545;
    --veil: #F0F2F4;
    --disabled: #6B7280;
    --success: #28a745;
}


/* BOOTSTRAP OVERRIDES */
:root {
    --bs-body-font-family: 'IBM Plex Sans', sans-serif;
}


/* FONTS */
body {
    font-family: var(--bs-body-font-family);
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Mono', monospace;
}



/* UTILS */
.spinner-border-lg {
    width: 3rem;
    height: 3rem;
}

.vault-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(30, 54, 67, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid var(--slate);
    position: relative;
    overflow: hidden;
}

.bg-hyperlake {
    background-color: var(--hyperlake);
    color: white;
}

.bg-primary {
    background-color: var(--vault-gold);
    color: white;
}



/* BUTTON STYLES */
.btn-primary {
    background-color: var(--vault-gold);
    border-color: var(--vault-gold);
    color: white;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.btn-primary:hover {
    background-color: var(--vault-gold-hover);
    border-color: var(--vault-gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--vault-gold-hover-rgb);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem var(--vault-gold-hover-rgb);
}

.btn-primary:active,
.btn-primary.active {
    background-color: var(--vault-gold-hover) !important;
    border-color: var(--vault-gold-hover) !important;
}

.btn-primary:disabled {
    background-color: var(--vault-gold-disabled) !important;
    opacity: 0.8 !important;
    border-color: var(--vault-gold) !important;
}

.btn-outline-primary {
    border-color: var(--vault-gold);
    color: var(--vault-gold);
}

.btn-outline-primary:hover {
    background-color: #E49A21;
    border-color: #E49A21;
}

.btn-outline-primary:focus {
    box-shadow: 0 0 0 0.2rem var(--vault-gold-hover-rgb);
}

.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: var(--vault-gold-hover) !important;
    border-color: var(--vault-gold-hover) !important;
    color: white !important;
}

.btn-outline-primary:disabled {
    border-color: var(--disabled) !important;
    color: var(--disabled) !important;
    opacity: 0.8 !important;
}


/* Login Submit Button Styling - Nova Theme */
.btn-trust {
    background-color: var(--nova);
    border-color: var(--nova);
    color: #fff;
}

.btn-trust:hover {
    background-color: var(--nova-hover);
    border-color: var(--nova-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--nova-hover-rgb);
}

.btn-trust:focus {
    box-shadow: 0 0 0 0.2rem var(--nova-hover-rgb);
    color: #fff;
}

.btn-trust:active,
.btn-trust.active {
    background-color: var(--nova-hover) !important;
    border-color: var(--nova-hover) !important;
    color: #fff !important;
}

.btn-trust:disabled {
    background-color: var(--nova) !important;
    border-color: var(--nova) !important;
    color: #fff !important;
    opacity: 0.8;
}

/* Outline Nova button - used by the MFA method picker */
.btn-outline-nova {
    border-color: var(--nova);
    color: var(--nova);
}

.btn-outline-nova:hover {
    background-color: var(--nova);
    border-color: var(--nova);
    color: #fff;
}

.btn-outline-nova:focus {
    box-shadow: 0 0 0 0.2rem var(--nova-hover-rgb);
}

.btn-outline-nova:active,
.btn-outline-nova.active {
    background-color: var(--nova-hover) !important;
    border-color: var(--nova-hover) !important;
    color: #fff !important;
}

.btn-outline-nova:disabled {
    border-color: var(--disabled) !important;
    color: var(--disabled) !important;
    opacity: 0.8 !important;
}

.btn-check:checked + .btn-outline-primary {
    background-color: var(--vault-gold) !important;
    border-color: var(--vault-gold) !important;
    color: white !important;
}
.btn-check:hover + .btn-outline-primary {
    background-color: var(--vault-gold-hover) !important;
    border-color: var(--vault-gold-hover) !important;
    color: white !important;
}




/* MODAL STYLES */
.modal-header {
    background-image: url("/static/img/banner/slate_watcher.6f4cc5916052.jpg");
    background-size: cover;
    background-position: center;
    width: 100%;
    object-fit: cover;
    z-index: 1;
    border-bottom: 1px solid #dee2e6;
}
.modal-body {
    background-image: url("/static/img/banner/ledger.6e3e75fdfdce.jpg");
    background-size: cover;
    background-position: center;
    width: 100%;
    object-fit: cover;
}
.modal-footer {
    background-color: #F7EEDF;
}
.modal-title {
    color: #F7EEDF;
    font-weight: 600;
}

/* Plans Section Placeholder */
.modal-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(30, 54, 67, 0.06);
    margin-top: 1.5rem;
}

.modal-section-header {
    color: #1E3643;
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #1E3643;
}

.modal-section-placeholder {
    text-align: center;
    color: #1E3643;
    opacity: 0.6;
    font-style: italic;
    padding: 2rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #1E3643, rgba(30, 54, 67, 0.3));
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 3px solid white;
    background-color: #E49A21;
    box-shadow: 0 2px 4px rgba(30, 54, 67, 0.2);
}


.timeline-action {
    color: #E49A21;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.timeline-date {
    color: #1E3643;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.timeline-ip {
    color: #1E3643;
    opacity: 0.6;
    font-size: 0.8rem;
    font-family: 'DM Mono', monospace;
}

.timeline-ellipsis {
    margin: 1rem 0;
    color: #1E3643;
    opacity: 0.6;
}

.timeline-ellipsis::before {
    content: '⋮';
    font-size: 1.5rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1rem;
    }

    .timeline-dot {
        left: -1.5rem;
    }
    .timeline::before {
        left: 0.5rem;
    }

    .vault-card {
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {

    .timeline-content {
        padding: 0.75rem;
    }

    .modal-section{
        padding: 1rem;
    }
}


/* Custom Brand Spinner */
.vault-spinner {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.vault-spinner-small {
    width: 2rem;
    height: 2rem;
}

.vault-spinner-medium {
    width: 3rem;
    height: 3rem;
}

.vault-spinner-large {
    width: 4rem;
    height: 4rem;
}

.vault-spinner-wheel {
    width: 100%;
    height: 100%;
    background-image: url("/static/img/brand/Vault Wheel ISO@4x.315843bea583.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: vault-spin 3s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(30, 54, 67, 0.15));
}

@keyframes vault-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Spinner container for centering */
.vault-spinner-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
}

/* Loading text styling */
.vault-spinner-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.875rem;
    color: #1E3643;
    opacity: 0.7;
    text-align: center;
}

/* Pulsing animation for loading text */
.vault-spinner-text.pulse {
    animation: vault-pulse 1.5s ease-in-out infinite;
}

@keyframes vault-pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
}

.spinner-border {
    color: #E49A21 !important;
}




/* Alert Styles */
.alert-success, .alert-info {
    background-color: rgba(61, 125, 214, 0.1);
    border-color: var(--hyperlake);
    color: var(--slate);
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
}

.alert-success .bi-check-circle, .alert-info .bi-info-circle {
    color: var(--hyperlake);
    font-size: 1.25rem;
}


/* Main table container */
.table-container .table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(30, 54, 67, 0.06);
    margin-bottom: 0;
    --bs-table-hover-bg: #E49A21;
}

.table-container .table thead {
    background-color: #E49A21;
}

.table-container .table thead th {
    color: #1E3643;
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none;
    padding: 1rem 0.75rem;
}

.table-container .table tbody tr {
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(240, 242, 244, 0.8);
}

.table-container .table tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 54, 67, 0.08);
}

.table-container .table tbody td {
    padding: .5rem 0.3rem;
    vertical-align: middle;
}

/* Search and filter controls */
.table-controls {
    background: #1E3643;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(30, 54, 67, 0.06);
}

.table-controls .form-control,
.table-controls .form-select {
    border-color: rgba(30, 54, 67, 0.2);
    border-radius: 6px;
    font-family: 'IBM Plex Sans', sans-serif;
}

.table-controls .form-control:focus,
.table-controls .form-select:focus {
    border-color: #E49A21;
    box-shadow: 0 0 0 0.2rem rgba(228, 154, 33, 0.25);
}

.table-controls .input-group-text {
    background-color: #1E3643;
    border-color: rgba(30, 54, 67, 0.2);
    color: #F7EEDF;
}

/* Sort indicators */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.sortable:hover {
    background-color: rgba(228, 154, 33, 0.1);
}

.sortable i {
    transition: color 0.2s ease;
}

/* Content type icons */
.content-type-icon {
    font-size: 1.25rem;
    margin-right: 0.5rem;
    color: var(--hyperlake);
}

/* Content titles and metadata */
.content-title {
    font-weight: 500;
    color: #1E3643;
    font-family: 'DM Mono', monospace;
}

.content-owner {
    color: #1E3643;
    font-weight: 500;
}

.content-date {
    color: #1E3643;
    font-weight: 500;
}

.content-ip {
    color: #1E3643;
    opacity: 0.6;
    font-size: 0.85rem;
    font-family: 'DM Mono', monospace;
}

.content-action {
    color: #1E3643;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}


/* Scrollable table body */
.table-body-container {
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid rgba(240, 242, 244, 0.8);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
    scrollbar-color: var(--vault-gold) rgba(228, 154, 33, 0.05);; /* Firefox support */
}

.table-body-container .table {
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.table-body-container .table thead {
    display: none;
}

.table-body-container .table tbody tr:first-child {
    border-top: none;
}

/* Custom scrollbar styling */
.table-body-container::-webkit-scrollbar {
    width: 8px;
}

.table-body-container::-webkit-scrollbar-track {
    background: #F7EEDF;
    border-radius: 4px;
}

.table-body-container::-webkit-scrollbar-thumb {
    background: #E49A21;
    border-radius: 4px;
    border: 2px solid #F7EEDF;
}

.table-body-container::-webkit-scrollbar-thumb:hover {
    background: var(--vault-gold-hover);
}

/* Empty state */
.content-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #1E3643;
}

.content-empty .display-4 {
    color: var(--slate);
    margin-bottom: 1rem;
}

.content-empty h5 {
    color: #1E3643;
    margin-bottom: 0.5rem;
}

.content-empty p {
    color: #1E3643;
    opacity: 0.8;
}


/* forms */
.form-control:focus {
    border-color: #E49A21;
    box-shadow: 0 0 0 0.2rem rgba(228, 154, 33, 0.25);
}

.form-check-input {
    border-color: rgba(30, 54, 67, 0.3);
}

.form-check-input:checked {
    background-color: var(--vault-gold);
    border-color: var(--vault-gold);
}

.form-check-input:focus {
    border-color: var(--vault-gold);
    box-shadow: 0 0 0 0.2rem var(--vault-gold-hover-rgb);
}

.form-check-input:checked:focus {
    background-color: var(--vault-gold);
    border-color: var(--vault-gold);
    box-shadow: 0 0 0 0.2rem var(--vault-gold-hover-rgb);
}

.form-check-input[type="checkbox"]:indeterminate {
    background-color: var(--vault-gold);
    border-color: var(--vault-gold);
}


/* STATUS BADGES */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'DM Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background-color: var(--veil);
    color: var(--hyperlake);
}

.status-pending {
    background-color: var(--veil);
    color: var(--hyperlake);
}

.status-active {
    background-color: var(--veil);
    color: var(--hyperlake);
}

.status-executed {
    background-color: var(--veil);
    color: var(--nova);
}

.status-cancelled {
    background-color: var(--veil);
    color: var(--emberline);
}

.status-recalled {
    background-color: var(--veil);
    color: var(--emberline);
}


/* Responsive design */
@media (max-width: 768px) {
    .table-container .table thead th,
    .table-container .table tbody td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .table-controls {
        padding: 0.75rem 1rem;
    }
}

/* Multi-step Wizard Styling */
.wizard-progress {
    margin-bottom: 2rem;
}

.progress-container {
    position: relative;
    width: 100%;
}

.progress-bar-container {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--vault-gold);
    border-radius: 2px;
    width: 33.33%;
    transition: width 0.3s ease;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.wizard-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.wizard-step.active .wizard-step-circle {
    background-color: var(--vault-gold);
    color: white;
    border-color: var(--vault-gold);
}

.wizard-step.completed .wizard-step-circle {
    background-color: var(--success);
    color: white;
    border-color: var(--success);
}

.wizard-step-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.75rem;
    color: var(--slate);
    font-weight: 500;
}

.wizard-step.active .wizard-step-label {
    color: var(--vault-gold);
    font-weight: 600;
}

.wizard-step.completed .wizard-step-label {
    color: var(--success);
}

/* Wizard panels */
.wizard-content {
    min-height: 300px;
}

.wizard-panel {
    display: none;
}

.wizard-panel.active {
    display: block;
}

/* Wizard Type Selection Cards */
.wizard-type-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wizard-type-option {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.wizard-type-option:hover {
    border-color: var(--vault-gold);
    box-shadow: 0 4px 12px rgba(228, 154, 33, 0.1);
    transform: translateY(-1px);
}

.wizard-type-option.selected {
    border-color: var(--vault-gold);
    background: rgba(228, 154, 33, 0.05);
    box-shadow: 0 4px 12px rgba(228, 154, 33, 0.15);
}

.wizard-type-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--vault-gold);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.wizard-type-info {
    flex: 1;
}

.wizard-type-title {
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    color: var(--slate);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.wizard-type-description {
    color: var(--slate);
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Wizard responsive adjustments */
@media (max-width: 768px) {
    .wizard-type-options {
        gap: 0.75rem;
    }

    .wizard-type-option {
        padding: 1rem;
    }

    .wizard-type-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        margin-right: 0.75rem;
    }
}

/* Security Level Text Badges */
.security-level-badge {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    letter-spacing: 0.3px;
    color: var(--slate);
}

.security-level-badge.security-low {
    background-color: rgba(40, 167, 69, 0.2);
}

.security-level-badge.security-medium {
    background-color: rgba(255, 193, 7, 0.2);
}

.security-level-badge.security-high {
    background-color: rgba(253, 126, 20, 0.2);
}

.security-level-badge.security-extreme {
    background-color: rgba(220, 53, 69, 0.2);
}

/* ASSOCIATED PLANS */
.associated-plans-container {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-color: var(--vault-gold) rgba(228, 154, 33, 0.05);; /* Firefox support */
}

.associated-plans-list {
    padding: 0.5rem 0;
    padding-right: 0.25rem;
}

/* Scrollbar styling to match secrets table */
.associated-plans-container::-webkit-scrollbar {
    width: 8px;
}

.associated-plans-container::-webkit-scrollbar-track {
    background: #F7EEDF;
    border-radius: 4px;
}

.associated-plans-container::-webkit-scrollbar-thumb {
    background: #E49A21;
    border-radius: 4px;
    border: 2px solid #F7EEDF;
}

.associated-plans-container::-webkit-scrollbar-thumb:hover {
    background: var(--vault-gold-hover);
}

.plan-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    background: rgba(66, 153, 225, 0.08);
    border-left: 3px solid var(--hyperlake);
    transition: background 0.2s ease;
}

.plan-item:last-child {
    margin-bottom: 0;
}

.plan-item-title {
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.plan-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.plan-owner {
    color: var(--slate);
    opacity: 0.8;
}