:root {
    --primary-color: #0073aa;
    --primary-dark: #005a87;
    --success-color: #46b450;
    --success-dark: #3ba13f;
    --danger-color: #dc3232;
    --warning-color: #ffb900;
    --text-primary: #23282d;
    --text-secondary: #666;
    --text-muted: #999;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --border-color: #ddd;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s ease;
}

.mindweco-model-usage-wrapper * {
    box-sizing: border-box;
}

.mindweco-model-usage-wrapper {
    padding: 0 20px;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans,
        Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.mindweco-model-usage-wrapper .mindweco-header-card {
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%) !important;
    color: white;
    padding: 32px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.mindweco-model-usage-wrapper .mindweco-header-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.mindweco-model-usage-wrapper .toast-container {
    z-index: 1060;
    margin-right: 80px;
    top: 100px;
}

.mindweco-model-usage-wrapper #subscription-toast {
    min-width: 300px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mindweco-model-usage-wrapper .mindweco-nav-tabs,
.mindweco-model-usage-wrapper .nav-tab-wrapper {
    margin-bottom: 0;
    border-bottom: none;
    display: flex;
    gap: 8px;
    background: #f8fafc;
    border-radius: 16px 16px 0 0;
    padding: 8px 8px 0 8px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
    flex: 1;
}

.mindweco-model-usage-wrapper .mindweco-nav-tab,
.mindweco-model-usage-wrapper .nav-tab {
    padding: 14px 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-radius: 12px 12px 0 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    text-align: center;
}

.mindweco-model-usage-wrapper .mindweco-nav-tab i,
.mindweco-model-usage-wrapper .nav-tab i {
    font-size: 16px;
}

.mindweco-model-usage-wrapper .mindweco-nav-tab:hover,
.mindweco-model-usage-wrapper .nav-tab:hover {
    color: #64748b !important;
    background: rgba(37, 99, 235, 0.08) !important;
    transform: translateY(-2px);
}

.mindweco-model-usage-wrapper .mindweco-nav-tab.nav-tab-active,
.mindweco-model-usage-wrapper .mindweco-nav-tab-active,
.mindweco-model-usage-wrapper .nav-tab-active {
    color: #64748b !important;
    background: #ffffff !important;
    box-shadow:
        0 -3px 10px rgba(37, 99, 235, 0.1),
        0 3px 0 0 #64748b inset !important;
    border-bottom: 3px solid #64748b !important;
}

.mindweco-model-usage-wrapper .tab-content {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.3s ease;
    min-height: 400px;
}

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

.mindweco-model-usage-wrapper .build-model-info {
    max-width: 800px;
    margin: 60px auto;
    text-align: center;
}

.mindweco-model-usage-wrapper .build-model-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.mindweco-model-usage-wrapper .build-model-header i {
    font-size: 48px;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.mindweco-model-usage-wrapper .build-model-header h2 {
    margin: 0;
    font-size: 32px;
    color: var(--text-primary);
    font-weight: 700;
}

.mindweco-model-usage-wrapper .build-model-content {
    background: linear-gradient(135deg, #f6f9fc 0%, #e9f2f9 100%);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 2px solid rgba(0, 115, 170, 0.1);
    margin-bottom: 32px;
}

.mindweco-model-usage-wrapper .build-model-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
}

.mindweco-model-usage-wrapper .build-model-content p:last-child {
    margin-bottom: 0;
}

.mindweco-model-usage-wrapper .build-model-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.mindweco-model-usage-wrapper .build-model-actions {
    margin-top: 32px;
}

.mindweco-model-usage-wrapper .button-large-action {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%) !important;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.mindweco-model-usage-wrapper .button-large-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 115, 170, 0.4);
}

.mindweco-model-usage-wrapper .button-large-action i {
    font-size: 22px;
    transition: transform var(--transition-normal);
}

.mindweco-model-usage-wrapper .button-large-action:hover i {
    transform: translateX(5px);
}

.mindweco-model-usage-wrapper .config-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 28px 32px;
    background: linear-gradient(135deg, #f6f9fc 0%, #e9f2f9 100%);
    border-radius: var(--radius-md);
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.mindweco-model-usage-wrapper .config-header-info h2 {
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 26px;
    color: var(--text-primary);
    font-weight: 700;
}

.mindweco-model-usage-wrapper .config-header-info h2 i {
    color: var(--primary-color);
    font-size: 28px;
}

.mindweco-model-usage-wrapper .tab-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 400;
}

.mindweco-model-usage-wrapper .config-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mindweco-model-usage-wrapper .btn-update-llm {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.mindweco-model-usage-wrapper .btn-update-llm:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.3);
}

.mindweco-model-usage-wrapper .btn-update-llm span {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    transition: color var(--transition-normal);
}

.mindweco-model-usage-wrapper .btn-update-llm:hover span {
    color: white;
}

.mindweco-model-usage-wrapper .btn-update-llm svg path {
    transition: stroke var(--transition-normal);
}

.mindweco-model-usage-wrapper .btn-update-llm:hover svg path {
    stroke: white;
}

.mindweco-model-usage-wrapper .btn-save-changes {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(70, 180, 80, 0.2);
}

.mindweco-model-usage-wrapper .btn-save-changes:hover {
    background: var(--success-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(70, 180, 80, 0.4);
}

.mindweco-model-usage-wrapper .btn-save-changes i {
    margin-right: 8px;
    font-size: 16px;
}

.mindweco-model-usage-wrapper .form-table {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.mindweco-model-usage-wrapper .form-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color var(--transition-fast);
}

.mindweco-model-usage-wrapper .form-table tbody tr:last-child {
    border-bottom: none;
}

.mindweco-model-usage-wrapper .form-table tbody tr:hover {
    background-color: #fafbfc;
}

.mindweco-model-usage-wrapper .form-table th {
    padding: 24px 28px;
    width: 220px;
    vertical-align: top;
}

.mindweco-model-usage-wrapper .form-table th label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    margin: 0;
}

.mindweco-model-usage-wrapper .form-table th label i {
    color: var(--primary-color);
    font-size: 20px;
}

.mindweco-model-usage-wrapper .form-table td {
    padding: 24px 28px;
}

.mindweco-model-usage-wrapper .form-input {
    width: 100%;
    max-width: 550px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition-normal);
    font-family: inherit;
    background: var(--bg-white);
}

.mindweco-model-usage-wrapper .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.1);
    background: white;
}

.mindweco-model-usage-wrapper .form-input::placeholder {
    color: #aaa;
    font-style: italic;
}

.mindweco-model-usage-wrapper .form-input[readonly] {
    background-color: #f5f5f5;
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: #e5e5e5;
}

.mindweco-model-usage-wrapper .input-wrapper {
    position: relative;
    width: 100%;
    max-width: 550px;
}

.mindweco-model-usage-wrapper .input-wrapper .form-input {
    padding-right: 50px;
}

.mindweco-model-usage-wrapper .toggle-password-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.mindweco-model-usage-wrapper .toggle-password-btn:hover {
    background: rgba(0, 115, 170, 0.1);
}

.mindweco-model-usage-wrapper .toggle-password-btn i {
    font-size: 18px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.mindweco-model-usage-wrapper .toggle-password-btn:hover i {
    color: var(--primary-color);
}

.mindweco-model-usage-wrapper .description {
    margin-top: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.mindweco-model-usage-wrapper .description .dashicons {
    margin-top: 2px;
    color: var(--primary-color);
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.mindweco-model-usage-wrapper .submit-section {
    margin-top: 40px;
    padding: 32px;
    background: linear-gradient(135deg, #f6f9fc 0%, #e9f2f9 100%);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    border: 2px dashed rgba(0, 115, 170, 0.2);
}

.mindweco-model-usage-wrapper .button-primary-llm-config {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 40px;
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%) !important;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
    position: relative;
    overflow: hidden;
}
.btn-disconnect-llm {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 40px;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
    position: relative;
    overflow: hidden;
}

.mindweco-model-usage-wrapper .button-primary-llm-config::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition:
        width 0.5s,
        height 0.5s;
}

.mindweco-model-usage-wrapper .button-primary-llm-config:hover::before {
    width: 300px;
    height: 300px;
}

.mindweco-model-usage-wrapper .button-primary-llm-config:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 115, 170, 0.5);
}

.mindweco-model-usage-wrapper .button-primary-llm-config i {
    font-size: 20px;
    position: relative;
    z-index: 1;
}

.mindweco-model-usage-wrapper .button-primary-llm-config span {
    position: relative;
    z-index: 1;
}

.mindweco-model-usage-wrapper #llm-config-form input:disabled,
.mindweco-model-usage-wrapper #llm-config-form select:disabled,
.mindweco-model-usage-wrapper #llm-config-form textarea:disabled {
    background: #f6f7f7;
    cursor: not-allowed;
}

.mindweco-model-usage-wrapper .update-input-on-edit {
    border: 2px solid #2271b1 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
    transition: all 0.2s ease;
}

.mindweco-model-usage-wrapper .loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.mindweco-model-usage-wrapper .loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(0, 115, 170, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.mindweco-model-usage-wrapper .success-message {
    padding: 16px 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-left: 4px solid var(--success-color);
    color: #155724;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

.mindweco-model-usage-wrapper .error-message {
    padding: 16px 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-left: 4px solid var(--danger-color);
    color: #721c24;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 1024px) {
    .mindweco-model-usage-wrapper {
        padding: 0 15px;
    }

    .mindweco-model-usage-wrapper .tab-content {
        padding: 30px 25px;
    }
}

@media (max-width: 768px) {
    .mindweco-model-usage-wrapper .mindweco-header-card {
        padding: 24px 28px;
    }

    .mindweco-model-usage-wrapper .mindweco-header-card h4 {
        font-size: 24px;
    }

    .mindweco-model-usage-wrapper .config-header-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 24px;
    }

    .mindweco-model-usage-wrapper .config-header-info h2 {
        font-size: 22px;
    }

    .mindweco-model-usage-wrapper .config-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .mindweco-model-usage-wrapper .mindweco-nav-tab {
        padding: 14px 20px;
        font-size: 14px;
    }

    .mindweco-model-usage-wrapper .mindweco-nav-tab i {
        font-size: 18px;
    }

    .mindweco-model-usage-wrapper .form-table th,
    .mindweco-model-usage-wrapper .form-table td {
        display: block;
        width: 100%;
        padding: 16px 20px;
    }

    .mindweco-model-usage-wrapper .form-table th {
        border-bottom: none;
        border-right: none;
        background: transparent;
        padding-bottom: 8px;
    }

    .mindweco-model-usage-wrapper .form-table td {
        padding-top: 0;
    }

    .mindweco-model-usage-wrapper .form-input,
    .mindweco-model-usage-wrapper .input-wrapper {
        max-width: 100%;
    }

    .mindweco-model-usage-wrapper .build-model-header h2 {
        font-size: 24px;
    }

    .mindweco-model-usage-wrapper .build-model-header i {
        font-size: 36px;
    }

    .mindweco-model-usage-wrapper .button-large-action {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .mindweco-model-usage-wrapper .mindweco-header-card {
        padding: 20px;
    }

    .mindweco-model-usage-wrapper .mindweco-header-card h4 {
        font-size: 20px;
    }

    .mindweco-model-usage-wrapper .tab-content {
        padding: 20px 16px;
    }

    .mindweco-model-usage-wrapper .build-model-content {
        padding: 20px;
    }

    .mindweco-model-usage-wrapper .button-primary-llm-config {
        width: 100%;
        justify-content: center;
    }

    .mindweco-model-usage-wrapper .toast-container {
        margin-right: 20px;
        left: 20px;
        right: 20px;
    }
}

.model-usage-title {
    margin: 0;
    color: #fff;
    font-size: 25px;
    font-weight: 600;
}
