/* Dashboard Main Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #ffffff;
    color: #353740;
}

.dashboard-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 220px;
    background-color: #f7f7f8;
    border-right: 1px solid #ececf1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ececf1;
    box-sizing: b;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 16px;
    color: #202123;
}

.logo i {
    font-size: 14px;
    font-style: normal;
    background-color: #333;
    color: #fff;
    width: 25px;
    height: 25px;
    line-height: 25px;
    border-radius: 25px;
    text-align: center;
}

.project-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #353740;
}

.project-selector:hover {
    border-color: #acacbe;
}

.project-selector i {
    font-size: 12px;
    color: #6e6e80;
}

/* Navigation Styles */
.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.section-title {
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 600;
    color: #6e6e80;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin: 2px 8px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #353740;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
}

.nav-item a:hover {
    background-color: #ececf1;
}

.nav-item.active a {
    background-color: #ececf1;
    font-weight: 500;
}

.nav-item a i {
    width: 20px;
    text-align: center;
    color: #6e6e80;
}

.nav-item.active a i {
    color: #353740;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    border-bottom: 1px solid #ececf1;
    background-color: white;
    box-sizing: border-box;
}

.header-left h1 {
    font-size: 18px;
    font-weight: normal;
    color: #999;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #353740;
    font-size: 20px;
    border-radius: 6px;
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    background-color: #f7f7f8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-link {
    color: #6e6e80;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.header-link:hover {
    color: #353740;
}

.settings-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6e6e80;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background-color: #f7f7f8;
    color: #353740;
}

.settings-btn i {
    font-size: 18px;
}

/* Content Area */
.content-area {
    flex: 1;
    overflow: hidden;
    padding: 0;
    background-color: #ffffff;
    position: relative;
}

/* Content Iframe */
#content-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6e6e80;
}

.loading i {
    font-size: 32px;
    margin-bottom: 16px;
}

.loading p {
    font-size: 14px;
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #6e6e80;
}

.error-state i {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 16px;
}

.error-state h3 {
    font-size: 20px;
    color: #353740;
    margin-bottom: 8px;
}

.error-state p {
    font-size: 14px;
    margin-bottom: 4px;
}

.error-detail {
    color: #ef4444;
    font-size: 12px;
    font-family: monospace;
}

/* Scrollbar Styles */
.sidebar-nav::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track,
.content-area::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover,
.content-area::-webkit-scrollbar-thumb:hover {
    background: #acacbe;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-area>* {
    animation: fadeIn 0.3s ease-out;
}

/* Page Container - for iframe content pages */
.page-container {
    padding: 32px;
    margin: 0 auto;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Ensure iframe pages can scroll */
body {
    overflow-y: auto;
    height: auto;
    min-height: 100%;
}

/* Legacy support */
.api-keys-container {
    padding: 0;
    max-width: 100%;
}

.api-keys-content {
    padding: 0;
}

.page-header {
    margin-bottom: 32px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: #202123;
    margin: 0;
}

.info-box {
    background-color: #f7f7f8;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.info-text {
    margin: 0;
    font-size: 14px;
    color: #353740;
}

.warning-box {
    background-color: #fff9e6;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid #f5c542;
}

.warning-text {
    margin: 0;
    font-size: 14px;
    color: #353740;
    line-height: 1.5;
}

.usage-info {
    margin-bottom: 24px;
}

.usage-info p {
    margin: 0;
    font-size: 14px;
    color: #6e6e80;
}

.text-link {
    color: #10a37f;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.list-table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* Table wrapper for scroll */
.table-wrapper {
    position: relative;
    overflow: hidden;
}

.table-scroll {
    overflow-x: auto;
    overflow-y: visible;
}

.table-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background-color: #f7f7f8;
    border-bottom: 1px solid #ececf1;
}

.table-header-content {
    display: flex;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.table-header-actions {
    width: 60px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.table-col {
    font-size: 12px;
    font-weight: 600;
    color: #6e6e80;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.table-col.col-wide {
    flex: 2;
}

.table-col.col-narrow {
    flex: 0.8;
}

.table-col.col-actions {
    flex: none;
    width: auto;
    justify-content: center;
}

.table-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #ececf1;
    transition: background-color 0.2s;
}

.table-row-content {
    display: flex;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.table-row-actions {
    width: 60px;
    flex-shrink: 0;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

.table-row:hover {
    background-color: #f7f7f8;
}

.table-row:hover .table-row-actions {
    background-color: #f7f7f8;
}

.table-row .table-col {
    font-size: 14px;
    font-weight: 400;
    color: #353740;
    text-transform: none;
    letter-spacing: 0;
}
.table-row span{
        white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tooltip-icon {
    color: #acacbe;
    cursor: help;
}

.btn-primary {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #666;
}

.btn-secondary {
    background-color: transparent;
    color: #353740;
    border: 1px solid #d1d5db;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #f7f7f8;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6e6e80;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: #f7f7f8;
    color: #353740;
}

.btn-delete:hover {
    color: #ef4444;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #ececf1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #202123;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6e6e80;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: #353740;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #353740;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #353740;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #10a37f;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #ececf1;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Pagination Styles */
.pager-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 24px 20px;
    margin-top: 16px;
}

.pager-container button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #353740;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pager-container button:hover:not(.disabled) {
    background-color: #f7f7f8;
    border-color: #acacbe;
    color: #353740;
}

.pager-container button.active {
    background-color: #353740;
    color: white;
    border-color: #353740;
}

.pager-container button.active:hover {
    background-color: #202123;
    color: white;
}

.pager-container button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pager-container button.cursor-not-allowed {
    cursor: not-allowed;
}

.pager-container .prevPage,
.pager-container .nextPage {
    padding: 0;
    width: 36px;
}

.pager-container svg {
    width: 16px;
    height: 16px;
}

.pager-container .w-4 {
    width: 16px;
}

.pager-container .h-4 {
    height: 16px;
}

@media (max-width: 768px) {
    .page-container {
        padding: 8px;
    }

    .page-header {
        margin: 10px 0;
    }

    .header-content h2 {
        padding-left: 8px;
    }

    .table-header-actions {
        width: 20px;
    }

    .table-row-actions {
        width: 20px;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        position: fixed;
        left: -220px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        left: 0;
    }

    /* Ã¦Â·Â»Ã¥Å Â Ã©ÂÂ®Ã§Â½Â©Ã¥Â±â€š */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    .top-header {
        padding: 12px 16px;
    }

    .header-left h1 {
        font-size: 18px;
    }

    .header-right {
        gap: 12px;
    }

    .header-link {
        display: none;
    }

    .content-area {
        padding: 0;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}