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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

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

.nav-container {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    gap: 10px;
}

.nav-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

nav button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

nav button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

nav button.active {
    background: #764ba2;
}

.breadcrumb {
    background: #e9ecef;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    margin-right: 10px;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #6c757d;
    margin: 0 10px;
}

.content {
    padding: 30px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    table-layout: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

table th,
table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* ID column (first column) - fixed width */
table th:first-child,
table td:first-child {
    font-weight: 600;
    color: #667eea;
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

/* Actions column (last column) - fixed width */
table th:last-child,
table td:last-child {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}

table tbody tr:hover {
    background: #f8f9fa;
    transition: background 0.2s;
}

table tbody tr:last-child td {
    border-bottom: none;
}

table tbody tr:nth-child(even) {
    background: #fafbfc;
}

table tbody tr:nth-child(even):hover {
    background: #f0f1f2;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.actions button {
    padding: 6px 14px;
    font-size: 12px;
    margin: 0;
    white-space: nowrap;
    min-width: 60px;
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.show {
    display: block;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #667eea;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.form-container {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.form-container.active {
    display: block !important;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-queued {
    background: #fff3cd;
    color: #856404;
}

.status-running {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.role-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.role-selector select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
}

.nested-view {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.nested-view h3 {
    color: #667eea;
    margin-bottom: 15px;
}

/* Better alignment for status badges */
.status-badge {
    display: inline-block;
    text-align: center;
}

/* Center align columns containing status badges */
table td:has(.status-badge),
table th:has(+ th + th + th) {
    text-align: center;
}

/* Responsive table wrapper */
.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

/* Better spacing for table content */
table td {
    word-wrap: break-word;
    max-width: 300px;
}

table td.actions {
    max-width: none;
}

/* Improve table readability */
table thead {
    border-bottom: 2px solid #667eea;
}

table tbody tr {
    transition: all 0.2s ease;
}
