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

:root {
    --primary: #FF6600;
    --primary-dark: #E55A00;
    --secondary: #FF8533;
    --accent: #FF6600;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --border: #E0E0E0;
    --text: hsla(0, 0%, 0%, 1);
    --text-light: hsla(0, 0%, 40%, 1);
    --success: #00C853;
    --warning: #FFA726;
    --danger: #E53935;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 20px 0;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.header-user-section {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
}

#user-greeting {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

#logout-btn {
    padding: 8px 16px;
    white-space: nowrap;
}

.logo {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    margin: 0;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    border-bottom: none;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.tab {
    padding: 14px 28px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    z-index: -1;
}

.tab:hover {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.08);
    transform: translateY(-2px);
}

.tab.active {
    color: #ffffff;
    background: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tab.active::before {
    opacity: 1;
}

.tab-content {
    display: none;
}

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

/* Search and Filters */
.controls {
    background: var(--surface);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input,
.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.search-box input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

#export-all-pdf {
    padding: 10px 20px;
    font-size: 13px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Alphabet Filter */
.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.letter-btn {
    min-width: 36px;
    height: 36px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.letter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.letter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.letter-btn:first-child {
    min-width: 50px;
}

#export-all-pdf i {
    font-size: 14px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.btn-secondary {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: var(--text-light);
}

/* Table */
.table-container {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

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

thead {
    background: var(--bg);
}

th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    border-bottom: 2px solid var(--border);
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

tbody tr:hover {
    background: var(--bg);
}

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

/* Expandable row styles */
tbody tr.row-expanded {
    background: var(--bg);
}

tbody tr.detail-row {
    background: #fafbfc;
    border-top: none !important;
}

tbody tr.detail-row td {
    padding: 0 !important;
    border-bottom: 2px solid var(--border) !important;
}

.detail-row-content {
    padding: 20px;
    animation: slideDown 0.3s ease-out;
}

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

.detail-row .detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 100%;
}

.detail-row .detail-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.detail-row .detail-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 5px;
    font-weight: 500;
}

.detail-row .detail-value {
    font-size: 14px;
    color: var(--text);
    word-wrap: break-word;
}

.detail-row .detail-value ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.detail-row .detail-value ul li {
    margin: 5px 0;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.view-btn i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.view-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.edit-btn {
    padding: 6px 14px;
    background: transparent;
    color: var(--warning);
    border: 1px solid var(--warning);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.edit-btn:hover {
    background: var(--warning);
    color: white;
    transform: translateY(-1px);
}

.delete-btn {
    padding: 6px 14px;
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-1px);
}

.pdf-btn {
    padding: 6px 14px;
    background: transparent;
    color: #D32F2F;
    border: 1px solid #D32F2F;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pdf-btn:hover {
    background: #D32F2F;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

.pdf-btn i {
    font-size: 13px;
}

.btn-warning {
    background: var(--warning) !important;
    color: white !important;
}

.btn-warning:hover {
    background: #FF8F00 !important;
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.modal-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close,
.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover,
.close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
}

.modal-body {
    padding: 15px 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.detail-item {
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 6px;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 3px;
}

.detail-value {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
}

.detail-value ul {
    margin: 3px 0 0 18px;
    padding: 0;
}

.detail-value ul li {
    margin-bottom: 3px;
    font-size: 13px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 5px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select,
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input[readonly],
.form-group input[disabled] {
    background: #f5f5f5;
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'Courier New', monospace;
}

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

/* Important Codes Styling */
.code-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.code-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-item-title {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.remove-code-btn {
    background: transparent;
    border: none;
    color: #D32F2F;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: color 0.2s;
}

.remove-code-btn:hover {
    color: #B71C1C;
}

.code-item input {
    width: 100%;
    margin-bottom: 10px;
}

.code-item textarea {
    width: 100%;
    min-height: 100px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
    color: var(--text);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px;
    border-top: 1px solid var(--border);
    background: #fafafa;
    margin: 0;
}

/* Content Sections */
.content-section {
    background: var(--surface);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.content-section h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text);
}

.content-section > p {
    margin-bottom: 25px;
    line-height: 1.6;
    color: var(--text);
}

.content-section h3 {
    font-size: 16px;
    margin: 20px 0 10px;
    color: var(--text);
}

.guide-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.guide-list li {
    padding: 10px 0 10px 24px;
    position: relative;
    line-height: 1.6;
    color: var(--text);
}

.guide-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.guide-list li strong {
    color: var(--primary);
    font-weight: 600;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .two-column {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.sub-tab-content {
    display: none;
}

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

.sub-tab {
    margin-right: 10px;
}

.sub-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.stat-card {
    flex: 1;
    background: var(--primary);
    padding: 24px;
    border-radius: 12px;
    border-left: none;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Send Info Section */
.send-info-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.send-info-section:last-child {
    border-bottom: none;
}

.send-info-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.send-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .send-grid {
        grid-template-columns: 1fr;
    }
}

.send-column {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.column-header {
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    color: var(--text);
}

.column-header.success {
    background: #ecfdf5;
    border-bottom-color: var(--success);
    color: #065f46;
}

.column-header.danger {
    background: #fef2f2;
    border-bottom-color: var(--danger);
    color: #991b1b;
}

.platform-list {
    list-style: none;
    padding: 10px;
    margin: 0;
}

.platform-list li {
    padding: 10px 12px;
    background: var(--surface);
    margin-bottom: 6px;
    border-radius: 4px;
    border-left: 3px solid var(--primary);
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.platform-list li:hover {
    background: #f1f5f9;
    transform: translateX(3px);
}

.platform-list li:last-child {
    margin-bottom: 0;
}

.delete-btn-inline {
    background: transparent;
    border: none;
    color: #D32F2F;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.delete-btn-inline:hover {
    background: #D32F2F;
    color: white;
}

.delete-btn-inline i {
    font-size: 12px;
}

/* ESP Search and Cards */
.esp-search-container {
    background: var(--surface);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.esp-search-container .search-box {
    margin-bottom: 12px;
}

.esp-search-container .search-box input {
    font-size: 15px;
    padding: 10px 14px;
}

.search-prompt {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin: 20px 0;
}

.prompt-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--primary);
}

.prompt-icon i {
    font-size: 48px;
}

.search-prompt h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.search-prompt p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.prompt-tips {
    background: var(--bg);
    border-radius: 6px;
    padding: 15px;
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.prompt-tips strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.prompt-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prompt-tips li {
    font-size: 13px;
    color: var(--text-light);
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.prompt-tips li::before {
    content: '•';
    position: absolute;
    left: 6px;
    color: var(--primary);
    font-weight: 700;
}

.quick-filters,
.platform-filters {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.esp-variable-filters {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-left: 15px;
    border-left: 3px solid var(--primary);
}

.platform-filter-simple {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.platform-select {
    min-width: 220px;
    padding: 6px 10px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s;
}

.platform-select:hover {
    border-color: var(--primary);
}

.platform-select:focus {
    outline: none;
    border-color: var(--primary);
}

.platform-select optgroup {
    font-weight: 700;
    color: var(--text);
    background: var(--bg);
    padding: 8px 0;
}

.platform-select option {
    padding: 8px 12px;
    font-weight: 500;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-right: 5px;
}

.filter-chip {
    padding: 6px 14px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.results-info {
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-light);
}

/* Table View */
.esp-table-container {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

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

.esp-table thead {
    background: var(--bg);
}

.esp-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.esp-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.esp-table tbody tr {
    transition: background 0.2s;
}

.esp-table tbody tr:hover {
    background: var(--bg);
}

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

.table-platform {
    font-weight: 700;
    color: var(--text);
}

.table-type-badge {
    display: inline-block;
    padding: 3px 8px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.table-type-badge.df {
    background: var(--success);
}

.table-variable {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
}

.table-code {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 12px;
    background: #1e293b;
    color: #10b981;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-copy-btn {
    padding: 4px 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.table-copy-btn:hover {
    transform: translateY(-1px);
}

.table-copy-btn.copied {
    background: var(--success);
}

/* Accordion Styles */
.accordion-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    background: var(--bg);
    transition: all 0.3s ease;
    user-select: none;
}

.accordion-header:hover {
    background: var(--border);
}

.accordion-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.accordion-header i {
    color: var(--primary);
    font-size: 14px;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 5000px;
}

.accordion-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 14px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 20px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
}

.accordion-content p {
    padding: 0 20px;
    margin: 10px 0;
    color: var(--text);
    line-height: 1.6;
    font-size: 13px;
}

.accordion-content p:first-child {
    padding-top: 20px;
}

.accordion-content p:last-child {
    padding-bottom: 20px;
}

.accordion-content ul.guide-list {
    padding: 0 20px 20px 40px;
    margin: 10px 0;
    font-size: 13px;
}

.accordion-content ul.guide-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.accordion-content p + pre {
    margin-top: 15px;
}

.accordion-content pre + p {
    margin-top: 20px;
}

.accordion-content ul + pre {
    margin-top: 15px;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablets and smaller */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .modal-content {
        max-width: 95%;
    }
    
    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    /* Header */
    header {
        padding: 10px 0;
        margin-bottom: 15px;
    }
    
    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
        padding: 0 10px;
    }
    
    .logo {
        height: 35px;
        order: 1;
    }
    
    header h1 {
        font-size: 14px;
        order: 3;
        width: 100%;
        text-align: left;
        margin-top: 5px;
    }
    
    .header-user-section {
        position: static;
        transform: none;
        order: 2;
        gap: 8px;
        flex-shrink: 0;
    }
    
    #user-greeting {
        font-size: 11px !important;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    #logout-btn {
        padding: 6px 10px !important;
        font-size: 11px;
    }
    
    .logout-text {
        display: none;
    }
    
    #logout-btn i {
        margin: 0;
    }
    
    /* Stats */
    .stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* Tabs */
    .tabs {
        flex-wrap: wrap;
        gap: 5px;
        padding: 8px;
    }
    
    .tab {
        padding: 10px 16px;
        font-size: 12px;
        flex: 1 1 auto;
        min-width: calc(50% - 5px);
    }
    
    /* Controls */
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box,
    .filter-group {
        width: 100%;
    }
    
    .filter-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-select {
        width: 100%;
    }
    
    /* Table */
    .table-container {
        overflow-x: visible;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    /* Hide extra columns in mobile */
    .hide-mobile {
        display: none !important;
    }
    
    /* User Management Table - Simplified for mobile */
    #user-management table,
    #clients table {
        font-size: 12px;
        min-width: auto;
        width: 100%;
    }
    
    #user-management th,
    #user-management td,
    #clients th,
    #clients td {
        padding: 10px 8px;
        white-space: normal;
    }
    
    #user-management th:first-child,
    #user-management td:first-child,
    #clients th:first-child,
    #clients td:first-child {
        position: static;
    }
    
    #user-management .form-input {
        font-size: 11px;
        padding: 5px 8px;
        min-width: auto;
        width: 100%;
        margin-bottom: 5px;
    }
    
    #user-management .btn-icon,
    #clients .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    #clients .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    #clients .action-buttons button {
        width: 100%;
        font-size: 11px;
        padding: 6px 10px;
    }
    
    /* Regular tables */
    table {
        font-size: 12px;
        min-width: 800px;
    }
    
    th, td {
        padding: 10px 8px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .btn-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    /* Modal */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 90vh;
        margin: auto;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-header h2 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    /* Forms */
    .form-section h3 {
        font-size: 16px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-label {
        font-size: 12px;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 14px;
        padding: 10px;
    }
    
    /* Detail Grid */
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .detail-item {
        padding: 10px;
    }
    
    .detail-label {
        font-size: 11px;
    }
    
    .detail-value {
        font-size: 13px;
    }
    
    /* Build Info */
    .build-info-item {
        padding: 12px;
    }
    
    .platform-name {
        font-size: 14px;
    }
    
    /* Accordion */
    .accordion-header {
        padding: 12px 15px;
    }
    
    .accordion-header h3 {
        font-size: 14px;
    }
    
    .accordion-content pre {
        font-size: 11px;
        padding: 12px;
        margin: 15px 10px;
    }
    
    /* Toast */
    .toast {
        min-width: auto;
        max-width: 90%;
        font-size: 13px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    header h1 {
        font-size: 12px;
    }
    
    .logo {
        height: 30px;
    }
    
    #user-greeting {
        display: none;
    }
    
    .tab {
        padding: 8px 10px;
        font-size: 10px;
        min-width: 100%;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    table {
        font-size: 10px;
        min-width: 600px;
    }
    
    #user-management table {
        font-size: 10px;
        min-width: 600px;
    }
    
    #user-management th,
    #user-management td {
        padding: 6px 4px;
    }
    
    .modal-header h2 {
        font-size: 14px;
    }
    
    .btn {
        padding: 8px 10px;
        font-size: 10px;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    header {
        position: relative;
    }
    
    .modal-content {
        max-height: 95vh;
    }
}
/* ==========================================
   IMPORTANT CODES SECTION
   ========================================== */

.codes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 20px;
}

.code-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.code-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.code-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    gap: 12px;
}

.code-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.code-item-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.code-desc {
    font-size: 12px;
    color: var(--text-light);
    margin-left: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.code-item-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-light);
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--bg);
    color: var(--primary);
}

.btn-icon.delete-code-icon-btn:hover {
    background: #fee;
    color: #D32F2F;
}

.code-item-content {
    background: #f8f9fa;
}

.code-item-content pre {
    margin: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
}

.code-item-content code {
    font-family: 'Courier New', Consolas, Monaco, monospace;
    color: #333;
}

.code-type-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-email {
    background: #E3F2FD;
    color: #1976D2;
}

.badge-frontend {
    background: #F3E5F5;
    color: #7B1FA2;
}

.code-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.code-filter-btn {
    transition: all 0.3s ease;
}

.code-filter-btn.active {
    background: var(--primary);
    color: white;
}

