/* Admin Interface Improvements for CISO Platform */

/* Better spacing and layout */
.form-section {
    margin-bottom: 2.5rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

/* Steampunk Card Styles - Fix for white text readability */
.steampunk-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #2d3748;
    padding: 0;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.steampunk-card .card-content {
    padding: 2rem;
    color: #2d3748;
}

.steampunk-card .title,
.steampunk-card .subtitle {
    color: #2d3748 !important;
}

.steampunk-card .content {
    color: #4a5568;
}

.steampunk-card .content ul li {
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.steampunk-card .content ul li strong {
    color: #2d3748;
}

.steampunk-card .label {
    color: #4a5568 !important;
    font-weight: 600;
}

/* Button styling for steampunk theme */
.btn-steampunk {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white !important;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-steampunk:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

/* Improved button consistency */
.button.is-ghost {
    background-color: transparent;
    border: 1px solid currentColor;
    color: inherit;
}

.button.is-ghost:hover {
    background-color: currentColor;
    color: white;
}

/* Better action buttons in tables */
.actions-column {
    white-space: nowrap;
}

.actions-column .buttons {
    justify-content: flex-end;
}

/* Improved card layouts */
.info-card {
    background: var(--background-card, white);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease;
}

.info-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Better permission grouping */
.permission-group {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #fafbfc;
}

.permission-group-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.permission-group-header .tag {
    margin-right: 0.75rem;
}

.permission-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
}

.permission-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.permission-item .checkbox {
    margin-right: 0.75rem;
}

.permission-item label {
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.permission-item:hover {
    background: rgba(59, 130, 246, 0.05);
    border-radius: 4px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge.status-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Improved form layouts */
.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Policy list improvements - fix text overlap */
.steampunk-card .level-left .level-item > div {
    width: 100%;
}

.steampunk-card .level-left .level-item .title.is-5 {
    margin-bottom: 1rem !important;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.steampunk-card .level-left .level-item .title.is-5 a {
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
}

.steampunk-card .level-left .level-item .title.is-5 a:hover {
    color: #3d3bfe;
}

.steampunk-card .level-left .level-item .subtitle.is-6 {
    margin-bottom: 1rem !important;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.steampunk-card .level-left .level-item .content {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.steampunk-card .level-left .level-item .tags {
    margin-bottom: 0;
    gap: 0.5rem;
}

.steampunk-card .level-left .level-item .tags .tag {
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Better table styles */
.data-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.data-table thead th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    padding: 1rem;
}

.data-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

.data-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* Count badges */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 1.5rem;
    padding: 0 0.5rem;
    background-color: #3b82f6;
    color: white;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.count-badge.count-zero {
    background-color: #9ca3af;
}

.count-badge.count-warning {
    background-color: #f59e0b;
}

.count-badge.count-danger {
    background-color: #ef4444;
}

/* Statistics cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Notification improvements */
.notification {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.notification.is-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.notification.is-warning {
    background-color: #fffbeb;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.notification.is-danger {
    background-color: #fef2f2;
    color: #991b1b !important;
    border-left: 4px solid #ef4444;
}

.notification.is-info {
    background-color: #eff6ff;
    color: #1e40af !important;
    border-left: 4px solid #3b82f6;
}

/* Fix text readability in content areas */
.page-container {
    color: #2d3748 !important;
}

.page-container .content,
.page-container .content p,
.page-container .content li {
    color: #4a5568 !important;
}

.page-container .title,
.page-container .subtitle {
    color: #2d3748 !important;
}

/* Fix form help text readability */
.help.is-info {
    color: #2563eb !important;
}

.help.is-danger {
    color: #dc2626 !important;
}

/* Fix white text in sections */
.section {
    color: #2d3748;
}

.section .content {
    color: #4a5568;
}

/* Fix any remaining white text issues */
.has-text-white {
    color: #2d3748 !important;
}

/* Improve readability for password security tips */
.steampunk-card .content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
}

.steampunk-card .content ul li {
    color: #4a5568 !important;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.steampunk-card .content ul li strong {
    color: #2d3748 !important;
    font-weight: 600;
}

/* Loading states */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Better breadcrumbs */
.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #374151;
}

.breadcrumb li.is-active a {
    color: #1f2937;
    font-weight: 600;
}

/* Improved modals */
.modal-card {
    border-radius: 12px;
    overflow: hidden;
}

.modal-card-head {
    background-color: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.modal-card-title {
    font-weight: 600;
    color: #1f2937;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .buttons.are-small .button {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Dark mode considerations */
@media (prefers-color-scheme: dark) {
    .info-card {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .data-table {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .data-table thead th {
        background-color: #374151;
        color: #f9fafb;
        border-bottom-color: #4b5563;
    }
    
    .data-table tbody tr {
        border-bottom-color: #374151;
    }
    
    .data-table tbody tr:hover {
        background-color: #374151;
    }
}

/* Organization Setup Steps */
.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.step-item.is-active {
    opacity: 1;
}

.step-item.is-success {
    opacity: 1;
    color: #16a085;
}

.step-marker {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: #e2e8f0;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: #64748b;
    transition: all 0.3s ease;
}

.step-item.is-active .step-marker {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.step-item.is-success .step-marker {
    background-color: #16a085;
    border-color: #16a085;
    color: white;
}

.step-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
    color: #64748b;
}

.step-item.is-active .step-title {
    color: #3b82f6;
}

.step-item.is-success .step-title {
    color: #16a085;
}

/* Connect steps with lines */
.step-item::before {
    content: '';
    position: absolute;
    top: 2.5rem;
    left: calc(50% + 3rem);
    width: calc(100% - 6rem);
    height: 2px;
    background-color: #e2e8f0;
    z-index: 0;
}

.step-item:last-child::before {
    display: none;
}

.step-item.is-success::before {
    background-color: #16a085;
}

.columns .step-item {
    position: relative;
}

/* Responsive step layout */
@media (max-width: 768px) {
    .step-item {
        padding: 0.5rem;
    }
    
    .step-marker {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .step-title {
        font-size: 0.75rem;
    }
}