/* llm-manager.html — page-specific styles */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0b0e13 0%, #141c28 100%);
    min-height: 100vh;
    color: #c9d2dc;
    line-height: 1.6;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Modern Sidebar with Glassmorphism */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 24px 0;
    box-shadow: 2px 0 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: calc(100vh - 120px);
}

.sidebar-content nav {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo img {
    height: 40px;
}

.header-buttons {
    margin-top: 16px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #8c99a8;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.header-btn:hover {
    background: rgba(43,139,230,0.2);
    border-color: #2b8be6;
    color: #2b8be6;
}

.header-btn .material-icons {
    font-size: 18px;
}

/* Modern Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: none;
    color: white;
    width: 100%;
    text-align: left;
    position: relative;
    border-radius: 0 25px 25px 0;
    margin: 4px 0;
}

.nav-item:hover {
    background: rgba(43,139,230,0.15);
    transform: translateX(5px);
}

.nav-item.active {
    background: #26303f;
    border-left: 4px solid #5468f2;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(84,104,242,0.3);
}

.nav-item .material-icons {
    margin-right: 12px;
    font-size: 20px;
    transition: all 0.3s ease;
}

.nav-text {
    flex: 1;
}

/* Return to Workbench Button Styling */
.workbench-return {
    margin-top: auto;
    background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin-top: 20px;
    border-radius: 12px;
    margin-left: 12px;
    margin-right: 12px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.workbench-return:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.workbench-return .material-icons {
    color: white;
}

.workbench-return .nav-text {
    color: white;
    font-weight: 600;
}

/* Main Content with Modern Styling */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.02);
}

/* Modern Header */
.header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.header p {
    color: #8c99a8;
    font-size: 16px;
}

/* Content Area */
.content {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
}

/* Modern Cards with Glassmorphism */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    margin-bottom: 32px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

.card-header {
    padding: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(43,139,230,0.1), rgba(84,104,242,0.1));
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #f2f5f9;
    display: flex;
    align-items: center;
}

.card-title .material-icons {
    margin-right: 12px;
    color: #2b8be6;
    font-size: 28px;
}

.card-content {
    padding: 32px;
}

.card h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #f2f5f9;
    display: flex;
    align-items: center;
}

.card h2 .material-icons {
    margin-right: 12px;
    color: #2b8be6;
    font-size: 24px;
}

.card h3 {
    color: #2b8be6;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #8c99a8;
}

.tab.active {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(43,139,230,0.4);
}

.tab-content {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Modern Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border-left: 4px solid #10b981;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.stat-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 8px 25px rgba(43,139,230,0.3);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #f2f5f9;
    margin-bottom: 8px;
}

.stat-label {
    color: #8c99a8;
    font-size: 14px;
    font-weight: 500;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 14px;
    color: #f2f5f9;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #2b8be6;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(43,139,230,0.1);
}

.form-control::placeholder {
    color: #8c99a8;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    margin-right: 10px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: white;
    box-shadow: 0 4px 15px rgba(43,139,230,0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43,139,230,0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

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

.provider-list {
    display: grid;
    gap: 15px;
}

.provider-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.provider-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
    border-color: rgba(43,139,230,0.3);
}

.provider-info {
    flex: 1;
}

.provider-name {
    font-weight: 600;
    color: #2b8be6;
    margin-bottom: 5px;
}

.provider-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 20px;
    color: white;
}

.status-active {
    background: #10b981;
}

.status-inactive {
    background: #ef4444;
}

.usage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.conversation-list {
    max-height: 400px;
    overflow-y: auto;
}

.conversation-item {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.conversation-title {
    font-weight: 600;
    color: #f2f5f9;
    margin-bottom: 5px;
}

.conversation-meta {
    font-size: 12px;
    color: #8c99a8;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    color: #f2f5f9;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #8c99a8;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-info {
    background: rgba(43,139,230,0.2);
    color: #2b8be6;
    border: 1px solid rgba(43,139,230,0.3);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(11,14,19,0.5);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2b8be6, #5468f2);
    border-radius: 4px;
    transition: width 0.3s ease;
}
