/* RAI Framework - Main CSS */
/* Colors from Evoke logo: Blue #1565C0, Orange #FF6D00 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #0d47a1 100%);
    min-height: 100vh;
    color: #333;
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(90deg, #0d47a1 0%, #1565c0 100%);
    padding: 12px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.nav-logo {
    height: 36px;
    width: auto;
    border-radius: 4px;
}

.navbar-brand span {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-container {
    position: relative;
    width: 320px;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #333;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-input:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    outline: none;
    border-color: #ff6d00;
    box-shadow: 0 0 0 3px rgba(255, 109, 0, 0.2);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f0f7ff;
}

.search-result-item:last-child {
    border-bottom: none;
}

.navbar-menu {
    position: relative;
}

.hamburger-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    padding: 8px 0;
    display: none;
    z-index: 1002;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #e3f2fd;
    color: #1565c0;
    padding-left: 25px;
}

/* Fixed Left Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 260px;
    height: calc(100vh - 60px);
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 5px;
    text-decoration: none;
    color: #374151;
}

.sidebar-item:hover {
    background: #e3f2fd;
    transform: translateX(3px);
}

.sidebar-item.active {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: white;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.sidebar-item-info {
    flex: 1;
}

.sidebar-item-name {
    font-weight: 600;
    font-size: 14px;
}

.sidebar-item-count {
    font-size: 12px;
    color: #6b7280;
}

.sidebar-item.active .sidebar-item-count {
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-item.active .sidebar-avatar {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    margin-top: 60px;
    padding: 25px 30px;
    min-height: calc(100vh - 60px);
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 25px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(21, 101, 192, 0.35);
}

.btn-orange {
    background: linear-gradient(135deg, #ff6d00 0%, #e65100 100%);
    color: white;
}

.btn-orange:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 109, 0, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

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

.stat-box {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    border-radius: 12px;
    padding: 25px;
    color: white;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(21, 101, 192, 0.4);
}

.stat-box-number {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-box-label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

/* Summary Boxes */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.summary-box {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.summary-box.total {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: white;
}

.summary-box.passed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.summary-box.input-failed {
    background: linear-gradient(135deg, #ff6d00 0%, #e65100 100%);
    color: white;
}

.summary-box.output-failed {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.summary-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.9;
}

.summary-number {
    font-size: 28px;
    font-weight: 700;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
}

td {
    color: #4b5563;
    font-size: 14px;
}

tr {
    transition: background 0.2s ease;
}

tr:hover {
    background: #e3f2fd;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    color: #ff6d00;
    border: 2px solid #ff6d00;
}

.tab-button.active {
    background: linear-gradient(135deg, #ff6d00 0%, #e65100 100%);
    color: white;
    border-color: transparent;
}

.tab-button:hover:not(.active) {
    background: #fff3e0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 46px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Popups */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.popup-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1f2937;
}

.popup-message {
    color: #6b7280;
    margin-bottom: 25px;
    line-height: 1.6;
}

.popup-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Form Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #1565c0;
}

.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

/* Log entries */
.log-entry {
    background: #e8f5e9;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    border-left: 4px solid #10b981;
}

.log-entry:hover {
    transform: translateX(3px);
}

.log-entry.failed {
    background: #ffebee;
    border-left-color: #ef4444;
}

.log-question {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 5px;
}

.log-meta {
    font-size: 12px;
    color: #6b7280;
}

.log-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.log-status.pass {
    background: #10b981;
    color: white;
}

.log-status.failed {
    background: #ef4444;
    color: white;
}

/* Responsive */
@media (max-width: 1200px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .platform-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 15px;
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 15px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        width: 180px;
    }
}
