/* meatdryer Admin Portal Styles */

@font-face {
    font-family: 'Raleway';
    src: url('./fonts/Raleway.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

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

.recipe-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr 1.5fr;
    gap: 20px;
    align-items: start;
}

.recipe-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.5;
    min-height: 100vh;
}

/* Authentication Loading Overlay */
.auth-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.auth-loading-content .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #262626;
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.auth-loading-content span {
    color: #888;
    font-size: 14px;
}

/* Hide main content until authenticated */
.main-app-content {
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #0a0a0a;
    border-bottom: 1px solid #262626;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: auto;
    filter: none;
}

.logo-text {
    font-family: 'Raleway', sans-serif;
    font-weight: 100;
    font-size: 28px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.portal-label {
    font-size: 20px;
    color: #ffffff;
    font-weight: 600;
    margin-left: 16px;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-email {
    color: #a3a3a3;
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: #ffffff;
    color: #0a0a0a;
}

.btn-primary:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #262626;
    color: #ffffff;
    border: 1px solid #404040;
}

.btn-secondary:hover {
    background: #404040;
    transform: translateY(-1px);
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Main Content */
.main-content {
    padding: 24px 0;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.page-description {
    font-size: 16px;
    color: #a3a3a3;
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.search-box {
    position: relative;
    min-width: 350px;
}

.search-box input {
    width: 100%;
    background: #171717;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 10px 16px;
    color: #ffffff;
    font-size: 14px;
    transition: border-color 0.2s ease;
    min-width: 350px;
}

.search-box input::placeholder {
    color: #737373;
}

.search-box input:focus {
    outline: none;
    border-color: #ffffff;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #737373;
    pointer-events: none;
}

/* Filter Box */
.filter-box select {
    background: #171717;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 10px 16px;
    color: #ffffff;
    font-size: 14px;
    transition: border-color 0.2s ease;
    min-width: 160px;
}

.filter-box select:focus {
    outline: none;
    border-color: #ffffff;
}

.filter-box select option {
    background: #171717;
    color: #ffffff;
}

/* Toolbar Right */
.toolbar-right {
    display: flex;
    gap: 12px;
}

/* Recipe Grid */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.recipe-card {
    background: #171717;
    border: 1px solid #262626;
    border-radius: 16px;
    padding: 20px;
    padding-bottom: 80px;
    position: relative;
    transition: all 0.2s ease;
    min-height: 220px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.recipe-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr 1.5fr;
    gap: 20px;
    align-items: start;
}

.recipe-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    text-align: left;
}

.column-header {
    font-size: 12px;
    color: #a3a3a3;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.column-value {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.4;
}

.recipe-card:hover {
    border-color: #404040;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.recipe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.recipe-category {
    display: inline-block;
    background: #262626;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

/* Level badges */
.level-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.level-novice {
    background: #10b981;
    color: #ffffff;
}

.level-seasoned {
    background: #f97316;
    color: #ffffff;
}

.level-master {
    background: #000000;
    color: #ffffff;
    border: 1px solid #404040;
}

/* Plus subscription badge */
.plus-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000000;
}

/* Translation status badges */
.translation-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    letter-spacing: 0.3px;
}

.translation-badge.lang-complete {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.translation-badge.lang-partial {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.translation-badge.lang-minimal {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.user-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
}

.recipe-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    text-align: left;
}

.recipe-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 12px;
    justify-content: flex-start;
}

.recipe-description {
    font-size: 13px;
    color: #a3a3a3;
    line-height: 1.4;
    margin: 0;
    text-align: left;
}

.recipe-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.recipe-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    flex: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 11px;
    color: #737373;
    font-weight: 500;
}

.stat-value {
    font-size: 13px;
    color: #ffffff;
    font-weight: 600;
}

.recipe-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 4px;
}

.recipe-image {
    width: 100%;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #262626;
}

.no-images {
    font-size: 12px;
    color: #737373;
    font-style: italic;
}

.recipe-actions {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
}

.recipe-actions .btn {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background: #171717;
    border: 1px solid #262626;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    margin: 40px auto;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #737373;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #262626;
    color: #ffffff;
}

.modal-body {
    padding: 0 24px 24px;
}

/* Modal action buttons */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding: 20px 24px 24px;
    border-top: 1px solid #262626;
}

/* Confirmation Modal - smaller and more centered */
#confirmModal {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

#confirmModal .modal-content {
    max-width: 300px;
    width: 90%;
    margin: 20vh auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#confirmModal .modal-body {
    padding: 24px 20px 20px;
}

#confirmModal .modal-body p {
    color: #d4d4d8;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

#confirmModal .modal-actions {
    padding: 0 20px 20px;
    margin-top: 16px;
    border-top: 1px solid #262626;
    padding-top: 16px;
}

/* Hook Modal Specific Styles */
#hookModal .modal-content {
    max-width: 600px;
}

#hookModal .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

#hookModal .detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#hookModal .detail-item label {
    font-size: 12px;
    font-weight: 500;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#hookModal .detail-item span {
    font-size: 14px;
    color: #ffffff;
    font-weight: 400;
}

#hookModal .error-list h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-top: 24px;
    border-top: 1px solid #262626;
}

#hookModal .error-item {
    background: #1c1c1c;
    border: 1px solid #262626;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

#hookModal .error-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

#hookModal .error-code {
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

#hookModal .error-time {
    font-size: 12px;
    color: #a1a1aa;
}

#hookModal .error-message {
    font-size: 14px;
    color: #d4d4d8;
    line-height: 1.4;
    margin-bottom: 8px;
}

#hookModal .error-severity {
    font-size: 12px;
    color: #a1a1aa;
}

#hookModal .no-errors {
    text-align: center;
    color: #a1a1aa;
    font-style: italic;
    padding: 24px;
}

/* User Modal Specific Styles */
#userModal .modal-content {
    max-width: 600px;
}

#userModal .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#userModal .detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#userModal .detail-item label {
    font-size: 12px;
    font-weight: 500;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#userModal .detail-item span {
    font-size: 14px;
    color: #ffffff;
    font-weight: 400;
    word-break: break-all;
    line-height: 1.4;
}

/* App Log Modal Specific Styles */
#appLogModal .modal-content {
    max-width: 600px;
}

#appLogModal .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#appLogModal .detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#appLogModal .detail-item label {
    font-size: 12px;
    font-weight: 500;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#appLogModal .detail-item span {
    font-size: 14px;
    color: #ffffff;
    font-weight: 400;
    word-break: break-all;
    line-height: 1.4;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 10px 12px;
    color: #ffffff;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #ffffff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #737373;
}

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

/* Specific textarea sizes for different fields */
#meatTypeDescription,
#meatTypeDescription_en,
#meatTypeDescription_sv,
#meatTypeDescription_de,
#meatTypeDescription_it,
#meatTypeDescription_fr,
#meatTypeDescription_es {
    min-height: 48px; /* 2 rows */
}

#recipeDescription,
#recipeDescription_en,
#recipeDescription_sv,
#recipeDescription_de,
#recipeDescription_it,
#recipeDescription_fr,
#recipeDescription_es {
    min-height: 300px; /* 15 rows */
}

/* Multi-language translation section */
.translations-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #262626;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.translations-hint {
    font-size: 13px;
    color: #a3a3a3;
    margin-bottom: 24px;
    line-height: 1.4;
}

.field-group {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #1a1a1a;
}

.field-group:last-child {
    border-bottom: none;
}

.field-group-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.language-field {
    background: #0d0d0d;
    border: 1px solid #262626;
    border-radius: 8px;
    padding: 16px;
}

.language-field-required {
    border-color: #404040;
    background: #0f0f0f;
}

.language-field .form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.required-indicator {
    color: #dc2626;
    font-weight: 700;
    margin-left: auto;
}

.language-flag {
    font-size: 18px;
    line-height: 1;
}

/* Responsive layout for language fields */
@media (max-width: 1024px) {
    .language-fields {
        grid-template-columns: 1fr;
    }
}

/* Field Validation Styles */
.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px #dc2626;
}

.field-error {
    display: block;
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 400;
}

.has-error .form-label {
    color: #dc2626;
}

/* Image Management */
.image-section {
    background: #0a0a0a;
    border: 1px solid #262626;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.existing-images {
    margin-bottom: 16px;
}

.existing-images h4 {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 12px;
}

.image-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.image-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid #262626;
    border-radius: 8px;
}

.image-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: #ef4444;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.file-upload {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-upload-input {
    display: none;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px dashed #404040;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: #a3a3a3;
    font-size: 14px;
}

.file-upload-label:hover {
    border-color: #ffffff;
    color: #ffffff;
}

.file-upload-hint {
    font-size: 12px;
    color: #737373;
    text-align: center;
}

/* Selected Files Preview */
.selected-files {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #262626;
}

.selected-files h4 {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 12px;
}

.selected-file-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #262626;
    border: 1px solid #404040;
}

.selected-file-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.selected-file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-size: 10px;
    padding: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: #ef4444;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Included Files List Styles */
.included-files-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #0d1117;
    margin-top: 10px;
}

.included-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #21262d;
    transition: background-color 0.2s ease;
}

.included-file-item:last-child {
    border-bottom: none;
}

.included-file-item:hover {
    background-color: #161b22;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    color: #f0f6fc;
    font-weight: 500;
    font-size: 14px;
}

.file-directory {
    color: #7d8590;
    font-size: 12px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.btn-small {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.message-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

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

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #737373;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #262626;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #737373;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: #a3a3a3;
    margin-bottom: 8px;
}

.empty-state-description {
    font-size: 14px;
    margin-bottom: 24px;
}

/* Field validation errors */
.field-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.form-group.has-error .form-label {
    color: #ef4444;
}

/* ============================
   ADMIN PORTAL - NAVIGATION TABS
   ============================ */

.nav-tabs {
    background: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 0;
}

.tab-list {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
}

.tab-button {
    background: transparent;
    border: none;
    color: #7d8590;
    padding: 16px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.tab-button:hover {
    color: #f0f6fc;
    background: rgba(255, 255, 255, 0.05);
}

.tab-button.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* ============================
   ADMIN PORTAL - CONTENT SECTIONS
   ============================ */

.content-section {
    display: none;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #30363d;
}

.section-header h2 {
    color: #f0f6fc;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.section-stats {
    color: #7d8590;
    font-size: 14px;
}

.stats-number {
    color: #ffffff;
    font-weight: 600;
}

/* ============================
   ADMIN PORTAL - LIST VIEWS
   ============================ */

.list-container {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
}

.list-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    background: #0d1117;
    border-bottom: 1px solid #30363d;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* OTA-specific column widths */
#otaList .list-header,
#otaList .list-row {
    grid-template-columns: 2fr 0.8fr 1.2fr 1fr 0.8fr;
}

.list-header-cell {
    padding: 12px 16px;
    color: #7d8590;
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid #30363d;
    user-select: none;
}

.list-header-cell:last-child {
    border-right: none;
}

.list-header-cell:hover {
    color: #f0f6fc;
    background: rgba(255, 255, 255, 0.05);
}

.list-rows {
    max-height: 600px;
    overflow-y: auto;
}

.list-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    border-bottom: 1px solid #30363d;
    transition: all 0.2s ease;
    cursor: pointer;
}

.list-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.list-row:last-child {
    border-bottom: none;
}

.list-cell {
    padding: 12px 16px;
    color: #f0f6fc;
    font-size: 14px;
    border-right: 1px solid #30363d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Allow first cell to wrap for version + badge */
.list-cell:first-child {
    white-space: normal;
    overflow: visible;
}

.list-cell:last-child {
    border-right: none;
}

.list-cell.primary {
    color: #ffffff;
    font-weight: 500;
}

.list-cell.secondary {
    color: #7d8590;
}

.list-cell.boolean {
    text-align: center;
}

.boolean-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #7d8590;
}

.boolean-indicator.true {
    background: #238636;
}

.boolean-indicator.false {
    background: #da3633;
}

/* Hook-specific grid */
.hook-list .list-header,
.hook-list .list-row {
    grid-template-columns: 2fr 2fr 2fr 1fr 80px 1.5fr;
}

/* User-specific grid */
.user-list .list-header,
.user-list .list-row {
    grid-template-columns: 1.5fr 1.5fr 1fr 80px 80px 80px 80px;
}

/* App logs-specific grid */
#appLogsList .list-header,
#appLogsList .list-row {
    grid-template-columns: 130px 150px 100px 100px 1fr;
}

/* Log Message Styling */
.log-message-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.error-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.domain-badge {
    background: #262626;
    color: #a3a3a3;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #404040;
}

.code-badge {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.message-text {
    line-height: 1.4;
}

/* Delete button in timestamp column */
.timestamp-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    justify-content: center;
}

.btn-delete-small {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.btn-delete-small:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}


/* ============================
   ADMIN PORTAL - HOOK/USER DETAILS
   ============================ */

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.detail-card {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 16px;
}

.detail-card h3 {
    color: #f0f6fc;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: #7d8590;
    font-size: 14px;
}

.detail-value {
    color: #f0f6fc;
    font-size: 14px;
    font-weight: 500;
}

.error-list {
    margin-top: 24px;
}

.error-list h3 {
    color: #f0f6fc;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.error-item {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
}

.error-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.error-code {
    color: #da3633;
    font-weight: 600;
    font-size: 14px;
}

.error-timestamp {
    color: #7d8590;
    font-size: 12px;
}

.error-message {
    color: #f0f6fc;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* ============================
   RESPONSIVE DESIGN - ADMIN PORTAL
   ============================ */

@media (max-width: 768px) {
    .tab-list {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: left;
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .tab-button.active {
        border-bottom: none;
        border-right-color: #ffffff;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .list-header,
    .list-row {
        grid-template-columns: 1fr !important;
        text-align: left;
    }
    
    .list-header-cell,
    .list-cell {
        border-right: none;
        border-bottom: 1px solid #30363d;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Measurement Summary Styles */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.summary-grid h3 {
  grid-column: 1 / -1;
  margin-top: 16px;
  margin-bottom: 8px;
  color: #2a3b4d;
}
.summary-search {
  margin-bottom: 16px;
}
.summary-search input {
  padding: 8px;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #bbb;
  margin-right: 8px;
}
.summary-search button {
  padding: 8px 16px;
  font-size: 1rem;
  border-radius: 4px;
  background: #2a3b4d;
  color: #fff;
  border: none;
  cursor: pointer;
}
.summary-search button:hover {
  background: #1a2533;
}
.loading, .error {
  margin-top: 16px;
  color: #b00;
}

/* App Logs Specific Styles */
.log-row {
  transition: background-color 0.2s ease;
}

.log-row:hover {
  background-color: #1a1a1a;
}

.log-message {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9em;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.log-message-detail {
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 16px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9em;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}

.stack-trace {
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 16px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.85em;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  color: #ff6b6b;
}

.additional-data {
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 16px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.85em;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  color: #a0a0a0;
}

/* Badge Styles */
.error-badge, .warning-badge, .info-badge, .badge-targeted, .badge-general,
.badge-success, .badge-warning, .badge-secondary {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.error-badge {
  background-color: #dc3545;
  color: #ffffff;
}

.warning-badge {
  background-color: #fd7e14;
  color: #ffffff;
}

.info-badge {
  background-color: #0dcaf0;
  color: #000000;
}

.badge-targeted {
  background-color: #ffc107;
  color: #000000;
  margin-left: 8px;
}

.badge-general {
  background-color: #28a745;
  color: #ffffff;
  margin-left: 8px;
}

.badge-success {
  background-color: #28a745;
  color: #ffffff;
}

.badge-warning {
  background-color: #ffc107;
  color: #000000;
}

.badge-secondary {
  background-color: #6c757d;
  color: #ffffff;
}

/* Mode badges */
.badge-mode-drying {
  background-color: #007bff; /* Blue */
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 8px;
}

.badge-mode-dry-aging {
  background-color: #fd7e14; /* Orange */
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 8px;
}

/* Pagination Styles */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid #333;
  margin-top: 20px;
}

.pagination .btn {
  min-width: 80px;
}

.pagination .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  font-size: 0.9em;
  color: #a0a0a0;
  min-width: 100px;
  text-align: center;
}

/* Measurement Summary Improvements */
.measurement-summaries-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.measurement-summary-card {
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
}

.measurement-summary-card:hover {
  border-color: #555;
  background: #0f0f0f;
}

.summary-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #333;
}

.summary-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 4px;
}

.summary-meta {
  font-size: 0.9em;
  color: #a0a0a0;
  font-family: 'Monaco', 'Consolas', monospace;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-section {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px;
}

.summary-section h4 {
  color: #ffffff;
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  background: transparent;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-item label {
  font-size: 0.85em;
  color: #a0a0a0;
  font-weight: 500;
}

.summary-item span {
  color: #ffffff;
  font-weight: 400;
}

/* Status badges - matching OTA table format */
.badge-status-active {
  background-color: #28a745;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-status-continued {
  background-color: #fd7e14;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-status-finished {
  background-color: #6c757d;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Filter toolbar */
.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  margin-bottom: 20px;
}

.filter-toolbar select {
  background: #0a0a0a;
  border: 1px solid #555;
  border-radius: 6px;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 0.9em;
  min-width: 150px;
}

.filter-toolbar select:focus {
  outline: none;
  border-color: #4a9eff;
}

.filter-toolbar .btn {
  margin-left: auto;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #a0a0a0;
}

.empty-state-title {
  font-size: 1.2em;
  margin-bottom: 8px;
  color: #ffffff;
}

.empty-state-description {
  font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .filter-toolbar .btn {
    margin-left: 0;
  }
}

/* Yellow stars for ratings */
.rating-stars {
  color: #ffc107 !important;
  font-size: 1.1em;
}

/* Blue feedback badges */
.feedback-badge {
  background-color: #007bff;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.8em;
  font-weight: 500;
  margin-right: 4px;
  display: inline-block;
}

/* OTA Detail Modal Styles */
.ota-detail-card {
  background: #171717;
  border: 1px solid #262626;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ota-detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.ota-detail-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
}

/* Directory Section Styles */
.directory-section {
  margin-bottom: 24px;
  background: #171717;
  border: 1px solid #262626;
  border-radius: 12px;
  overflow: hidden;
}

.directory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #1f1f1f;
  border-bottom: 1px solid #262626;
}

.directory-header h4 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-count {
  color: #a3a3a3;
  font-size: 12px;
  font-weight: 500;
  background: #262626;
  padding: 4px 8px;
  border-radius: 6px;
}

.files-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #0f0f0f;
  border: 1px solid #262626;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.file-card:hover {
  border-color: #404040;
  background: #1a1a1a;
}

.file-icon {
  font-size: 24px;
  color: #a3a3a3;
  flex-shrink: 0;
}

.file-details {
  flex: 1;
  min-width: 0;
}

/* User Error Badge */
.user-error-badge {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Delete button for user errors */
.btn-delete-error {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.7;
}

.btn-delete-error:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.btn-delete-error svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Toggle Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #3a3a3c;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: #30d158;
}

input:focus + .slider {
  box-shadow: 0 0 1px #30d158;
}

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

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.file-details .file-name {
  color: #ffffff;
  font-weight: 500;
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
  word-break: break-word;
}

.file-details .file-path {
  color: #a3a3a3;
  font-size: 12px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  word-break: break-all;
}

/* Error Analytics Styles */
.error-code-val {
    font-weight: 600;
    color: #ffffff;
}

.error-domain-val {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.list-cell.code-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
}