* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 600;
    margin-bottom: 10px;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1em;
}

.container {
    display: flex;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    min-height: calc(100vh - 140px);
}

.panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.left-panel {
    width: 40vw;
    overflow-y: auto;
}

.right-panel {
    width: 60vw;
    overflow-y: auto;
}

.section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
    font-weight: 600;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #3498db;
}

.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.input-row .input-group {
    flex: 1;
    margin-bottom: 0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #27ae60;
    color: white;
}

.btn-secondary:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.matrix-container {
    margin-top: 15px;
    overflow-x: auto;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.matrix-table th,
.matrix-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.matrix-table th {
    background: #ecf0f1;
    color: #2c3e50;
    font-weight: 600;
}

.matrix-table input {
    width: 60px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.matrix-table input:focus {
    outline: none;
    border-color: #3498db;
}

.matrix-table.readonly td {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 500;
}

.status-box {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
}

.status-safe {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.status-unsafe {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

.sequence-box {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #3498db;
}

.sequence-box strong {
    color: #2c3e50;
}

.sequence-box span {
    color: #3498db;
    font-weight: 600;
    font-size: 1.1em;
}

.steps-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.steps-table th,
.steps-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.steps-table th {
    background: #34495e;
    color: white;
    font-weight: 600;
}

.steps-table tr:nth-child(even) {
    background: #f8f9fa;
}

.steps-table .check-yes {
    color: #27ae60;
    font-weight: 600;
}

.steps-table .check-no {
    color: #e74c3c;
    font-weight: 600;
}

.log-entry {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 4px solid #95a5a6;
}

.log-entry.granted {
    border-left-color: #27ae60;
}

.log-entry.denied {
    border-left-color: #e74c3c;
}

.log-entry .log-header {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.log-entry .log-details {
    color: #7f8c8d;
    margin-bottom: 5px;
}

.log-entry .log-outcome {
    font-weight: 600;
    margin-top: 5px;
}

.log-entry.granted .log-outcome {
    color: #27ae60;
}

.log-entry.denied .log-outcome {
    color: #e74c3c;
}

.empty-state {
    text-align: center;
    color: #95a5a6;
    padding: 40px;
    font-style: italic;
}

.collapsible {
    margin-top: 20px;
}

.collapsible-header {
    background: #34495e;
    color: white;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapsible-header:hover {
    background: #2c3e50;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-content.active {
    max-height: 1000px;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}