:root {
    --bg-color: #ffffff;
    --nav-color: #ffffff;
    --text-color: #000000;
    --error-color: #000000;
    --accent-color: #9facf4;
    --border-color: #000000;
    --header-color: #000000;
    --primary-color: #808ef7;
    --success-color: #7888f5;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    margin: 0; 
    padding: 0; 
    background: var(--bg-color);
}

.header { background: #333; color: white; padding: 1rem; }
.nav { display: flex; gap: 1rem; }
.nav a { color: white; text-decoration: none; }
.container { max-width: 80; margin: 0 auto; padding: 2rem; }
		
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.view-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.view-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.view-toggle button {
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s;
}

.view-toggle button.active {
    background: var(--primary-color);
    color: white;
}

.sort-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

/* Quick Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    background: white;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Company List View */
.company-list {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.company-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.company-table thead th {
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    text-align: left;
}

.company-table tbody tr.company-row {
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #eee;
}

.company-table tbody tr.company-row:hover {
    background: #f8f9fa;
}

.company-table tbody tr.company-row:last-child {
    border-bottom: none;
}

.company-table td {
    padding: 15px;
}

.company-table td:not(:first-child) {
    text-align: center;
}

.company-table thead th:not(:first-child) {
    text-align: center;
}

.company-table td.company-name {
    font-weight: 500;
    color: #333;
}

/* Company Cards View */
.company-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.company-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

.company-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.company-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.company-card-header > div:first-child {
    flex: 1;
}

.company-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.company-card-id {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.company-card-files {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
}

/* File List/Cards (when viewing company files) */
.file-list {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.file-list-header {
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 120px;
    gap: 15px;
    font-weight: bold;
}

.file-list-row {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 120px;
    gap: 15px;
    align-items: center;
}

.file-list-row:last-child {
    border-bottom: none;
}

.file-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.file-card {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 4px;
    background: white;
}

.file-card-title {
    font-weight: 500;
    color: #333;
    margin: 0 0 10px 0;
}

.file-card-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Info Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.info-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.info-btn:hover {
    background: #138496;
}

.back-btn {
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
}

.view-btn {
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: filter 1s ease;
    border: none;
    cursor: pointer;
}

.delete-btn {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: filter 1s ease;
}

.delete-btn:hover {
    filter: brightness(0.85);
}

.delete-btn-card {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: filter 1s ease;
}

.delete-btn-card:hover {
    filter: brightness(0.85);
}

.view-btn:hover {
    color: white;
    text-decoration: none;
    filter: brightness(0.85);
}

/* Responsive */
@media (max-width: 768px) {
    .company-list-header,
    .company-list-row {
        grid-template-columns: 1fr 80px;
    }
    
    .company-list-header .company-id,
    .company-list-header .file-count:nth-child(3),
    .company-list-row .company-id,
    .company-list-row .file-count:nth-child(3) {
        display: none;
    }
    
    .file-list-header,
    .file-list-row {
        grid-template-columns: 1fr 100px;
    }
    
    .file-list-header > *:not(:first-child):not(:last-child),
    .file-list-row > *:not(:first-child):not(:last-child) {
        display: none;
    }
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.module-card {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    transition: box-shadow 0.2s ease;
}

.module-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.analysis-results {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.summary-table-container {
    margin-top: 20px;
    overflow: auto;
    max-height: 800px;
    border: 1px solid #ddd;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table th {
    border: 1px solid #ddd;
    padding: 8px;
    background: #f8f9fa;
    position: sticky;
    top: 0;
}

.summary-table td {
    border: 1px solid #ddd;
    padding: 8px;
    white-space: nowrap;
    text-align: right;
}

.summary-table td:first-child {
    text-align: left;
}

/* Tab Navigation Styles */
.tab-navigation {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.tab-links {
    display: flex;
    gap: 20px;
}

.tab-link {
    padding: 12px 0;
    text-decoration: none;
    background: transparent;
    color: var(--text-color);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    opacity: 0.6;
}

.tab-link.active {
    background: transparent;
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    opacity: 1;
}

.tab-link:hover:not(.active) {
    color: var(--text-color);
    border-bottom-color: var(--border-color);
    opacity: 0.8;
}

.tab-content {
    padding: 20px 0;
    border: none;
    background: transparent;
}

/* Alert Styles */
.alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: var(--success-color);
    color: white;
}

.alert-error {
    background: var(--error-color);
    color: white;
}

/* Form Styles */
.profile-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    background: var(--bg-color);
}

.form-input-disabled {
    background: #f5f5f5;
}

.form-input-small {
    width: 150px;
}

.form-help {
    color: #666;
    font-size: 14px;
}

.form-checkbox {
    display: flex;
    align-items: center;
}

.form-checkbox input {
    margin-right: 8px;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

/* Preferences Layout */
.preferences-container {
    max-width: 600px;
}

.preference-section {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    background: var(--bg-color);
}

/* Security Layout */
.security-container {
    max-width: 800px;
}

.security-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.security-section {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
}

.twofa-setup {
    margin-bottom: 15px;
}

.qr-code {
    border: 1px solid var(--border-color);
    padding: 10px;
}

.twofa-disabled {
    color: #666;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .security-grid {
        grid-template-columns: 1fr;
    }
}