/* ============================================
   PAGE TYPES CSS
   Consistent styling for Table and Card pages
   ============================================ */

/* ===== Shared Page Container ===== */
.config-page {
    padding: 24px;
    background: var(--bg-primary, #0a0a0f);
    min-height: 100vh;
}

.config-page .page-header {
    margin-bottom: 24px;
}

.config-page .page-header-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin: 0 0 8px 0;
}

.config-page .page-header-content p {
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
    font-size: 14px;
    margin: 0;
}


/* ============================================
   TABLE PAGE TYPE
   For: Menus, Items, Discounts, Fees, Automation, 
        Customers, Orders (History), Punch History
   ============================================ */

.table-page-container {
    background: var(--bg-card, #1e1e2a);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    overflow: hidden;
}

.automation-tab-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Table Header with Search/Filter/Add */
.table-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    flex-wrap: wrap;
    gap: 16px;
}

.table-page-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-page-header .header-left h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin: 0;
}

.table-page-header .item-count {
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
}

.table-page-header .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Search Box */
.table-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.table-search-box svg,
.table-search-box .search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    pointer-events: none;
}

.table-search-box input {
    padding: 10px 36px 10px 40px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary, #ffffff);
    min-width: 220px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.table-search-box input:focus {
    outline: none;
    border-color: var(--accent-primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.table-search-box input::placeholder {
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.table-search-box .clear-search {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    line-height: 1;
}

.table-search-box .clear-search:hover {
    color: var(--text-primary);
}

/* Filter Buttons Container */
.table-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Table Wrapper */
.table-page-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Data Table */
.table-page-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-page-table thead {
    background: var(--bg-tertiary, #252530);
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-page-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.table-page-table th:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table-page-table th:first-child {
    padding-left: 24px;
}

.table-page-table th:last-child {
    padding-right: 24px;
}

/* Sortable Column Headers */
.table-page-table th.sortable {
    cursor: pointer;
}

.table-page-table th.sortable:hover {
    color: var(--text-primary, #ffffff);
}

.table-page-table th .sort-indicator {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.table-page-table th.sorted .sort-indicator {
    opacity: 1;
    color: var(--accent-primary, #6366f1);
}

.table-page-table th.sorted-asc .sort-indicator::after {
    content: '▲';
}

.table-page-table th.sorted-desc .sort-indicator::after {
    content: '▼';
}

/* Table Body */
.table-page-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-primary, #ffffff);
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    vertical-align: middle;
}

.table-page-table td:first-child {
    padding-left: 24px;
}

.table-page-table td:last-child {
    padding-right: 24px;
}

.table-page-table tbody tr {
    transition: background-color 0.2s ease;
}

.table-page-table tbody tr:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.03));
}

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

/* Item Name Cell */
.table-page-table .item-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.table-page-table .item-name-cell strong {
    color: var(--text-primary, #ffffff);
    font-weight: 600;
}

.table-page-table .item-name-cell .item-desc {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

/* Action Buttons in Table */
.table-page-table .table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.table-page-table .action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.table-page-table .action-btn.edit {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.table-page-table .action-btn.edit:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
}

.table-page-table .action-btn.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.table-page-table .action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.table-page-table .action-btn.view {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.table-page-table .action-btn.view:hover {
    background: rgba(34, 197, 94, 0.25);
    color: #86efac;
}

/* Empty State */
.table-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.table-empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
    color: var(--text-muted);
}

.table-empty-state .empty-icon i {
    font-size: 48px;
}

.table-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin: 0 0 8px 0;
}

.table-empty-state p {
    font-size: 14px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin: 0 0 20px 0;
    max-width: 400px;
}


/* ============================================
   CARD PAGE TYPE
   For: Flows, Departments, Categories, 
        Modifiers, Orders (Current)
   ============================================ */

.card-page-container {
    background: var(--bg-card, #1e1e2a);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    overflow: hidden;
}

/* Card Page Header - Same as Table */
.card-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    flex-wrap: wrap;
    gap: 16px;
}

.card-page-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-page-header .header-left h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin: 0;
}

.card-page-header .item-count {
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
}

.card-page-header .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Card Search Box - Same as Table */
.card-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.card-search-box svg,
.card-search-box .search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    pointer-events: none;
}

.card-search-box input {
    padding: 10px 36px 10px 40px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary, #ffffff);
    min-width: 220px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card-search-box input:focus {
    outline: none;
    border-color: var(--accent-primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.card-search-box input::placeholder {
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.card-search-box .clear-search {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    line-height: 1;
}

.card-search-box .clear-search:hover {
    color: var(--text-primary);
}

/* Cards Grid */
.card-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Individual Card */
.page-card {
    background: var(--bg-secondary, #1a1a2e);
    border-radius: 12px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.page-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary-light, rgba(99, 102, 241, 0.3));
}

/* Card Header */
.page-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
}

.page-card-icon {
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    flex-shrink: 0;
}

.page-card-title {
    flex: 1;
    min-width: 0;
}

.page-card-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-card-title .subtitle {
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    display: block;
    margin-top: 2px;
}

/* Card Body */
.page-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-card-row .label {
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.page-card-row .value {
    font-size: 13px;
    color: var(--text-primary, #ffffff);
    font-weight: 500;
}

/* Card Badges */
.page-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Card Footer / Actions */
.page-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

.page-card-actions .action-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.page-card-actions .action-btn.edit {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.page-card-actions .action-btn.edit:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
}

.page-card-actions .action-btn.view {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.page-card-actions .action-btn.view:hover {
    background: rgba(34, 197, 94, 0.25);
    color: #86efac;
}

.page-card-actions .action-btn.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    flex: 0;
    padding: 8px 12px;
}

.page-card-actions .action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

/* Empty State for Cards */
.card-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.card-empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
    color: var(--text-muted);
}

.card-empty-state .empty-icon i {
    font-size: 48px;
}

.card-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin: 0 0 8px 0;
}

.card-empty-state p {
    font-size: 14px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin: 0 0 20px 0;
    max-width: 400px;
}


/* ===== Category Card ===== */
.category-card {
    background: var(--bg-secondary, #1a1a2e);
    border-radius: 12px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary-light, rgba(99, 102, 241, 0.3));
}

.category-card-header {
    padding: 16px;
    padding-left: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
}

.category-card .category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    font-size: 18px;
    flex-shrink: 0;
}

.category-card .category-title {
    flex: 1;
    min-width: 0;
}

.category-card .category-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin: 0 0 4px 0;
}

.category-card .category-description {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-card .category-description i {
    font-size: 10px;
}

.category-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-card .category-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.category-card .detail-label {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.category-card .category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.category-card-actions {
    padding: 12px 16px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    display: flex;
    gap: 8px;
}

.category-card-actions .action-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.category-card-actions .action-btn.edit {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.category-card-actions .action-btn.edit:hover {
    background: rgba(52, 152, 219, 0.25);
}

.category-card-actions .action-btn.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    flex: 0;
    padding: 8px 12px;
}

.category-card-actions .action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Light Mode */
[data-theme="light"] .category-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .category-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}


/* ===== Department Card ===== */
.department-card {
    background: var(--bg-secondary, #1a1a2e);
    border-radius: 12px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.department-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary-light, rgba(99, 102, 241, 0.3));
}

.department-card-header {
    padding: 16px;
    padding-left: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
}

.department-card .department-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    font-size: 18px;
    flex-shrink: 0;
}

.department-card .department-title {
    flex: 1;
    min-width: 0;
}

.department-card .department-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin: 0 0 4px 0;
}

.department-card .department-description {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
    font-family: 'SF Mono', 'Monaco', monospace;
    text-transform: uppercase;
}

.department-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.department-card .department-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.department-card .detail-label {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.department-card .department-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.department-card-actions {
    padding: 12px 16px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    display: flex;
    gap: 8px;
}

.department-card-actions .action-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.department-card-actions .action-btn.edit {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.department-card-actions .action-btn.edit:hover {
    background: rgba(52, 152, 219, 0.25);
}

.department-card-actions .action-btn.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    flex: 0;
    padding: 8px 12px;
}

.department-card-actions .action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Light Mode */
[data-theme="light"] .department-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .department-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .department-card-body {
    background: #f8fafc;
}


/* ===== Modifier Group Card ===== */
.modifier-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    padding: 20px;
}

.modifier-group-manage-card {
    background: var(--bg-secondary, #1a1a2e);
    border-radius: 12px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modifier-group-manage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary-light, rgba(99, 102, 241, 0.3));
}

.modifier-group-manage-card .manage-card-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.modifier-group-manage-card .manage-card-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin: 0 0 8px 0;
}

.modifier-group-manage-card .manage-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modifier-group-manage-card .manage-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.modifier-group-manage-card .manage-card-body {
    padding: 12px 16px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

.modifier-group-manage-card .modifier-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modifier-group-manage-card .modifier-list-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin-bottom: 8px;
}

.modifier-group-manage-card .modifier-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-primary, #ffffff);
}

.modifier-group-manage-card .modifier-chip .modifier-price {
    color: var(--accent-primary, #6366f1);
    font-weight: 500;
}

/* Modifiers List inside Card */
.modifiers-list-manage {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.modifier-item-manage {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.04));
    border-radius: 8px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    transition: all 0.2s;
}

.modifier-item-manage:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.1);
}

.modifier-item-manage.unavailable {
    opacity: 0.5;
}

.modifier-item-manage .modifier-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #ffffff);
}

.modifier-item-manage .modifier-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modifier-item-manage .price-adj {
    font-size: 13px;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', monospace;
    padding: 2px 8px;
    border-radius: 4px;
}

.modifier-item-manage .price-adj.add {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.modifier-item-manage .price-adj.sub {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.modifier-item-manage .inv-link {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    display: flex;
    align-items: center;
    gap: 4px;
}

.modifier-item-manage .modifier-item-actions {
    display: flex;
    flex-direction: row;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.modifier-item-manage:hover .modifier-item-actions {
    opacity: 1;
}

.modifier-item-manage .modifier-item-actions button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
}

.modifier-item-manage .modifier-item-actions button:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.modifier-item-manage .modifier-item-actions button:last-child:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Light Mode */
[data-theme="light"] .modifier-item-manage {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .modifier-item-manage:hover {
    background: #f1f5f9;
}

/* Light Mode */
[data-theme="light"] .modifier-group-manage-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .modifier-group-manage-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}


/* ===== Flow Card ===== */
.flow-card {
    background: var(--bg-secondary, #1a1a2e);
    border-radius: 12px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.flow-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary-light, rgba(99, 102, 241, 0.3));
}

.flow-card-header {
    padding: 16px;
    padding-left: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
}

.flow-card .flow-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    font-size: 18px;
    flex-shrink: 0;
}

.flow-card .flow-title {
    flex: 1;
    min-width: 0;
}

.flow-card .flow-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin: 0 0 4px 0;
}

.flow-card .flow-description {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flow-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flow-card .flow-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.flow-card .detail-label {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.flow-card .color-swatch-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flow-card .color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.flow-card .color-code {
    font-size: 12px;
    font-family: monospace;
    color: var(--text-secondary, rgba(255, 255, 255, 0.8));
}

.flow-card .threshold-badges {
    display: flex;
    gap: 8px;
}

.flow-card .threshold-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.flow-card .threshold-badge.yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.flow-card .threshold-badge.red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.flow-card .flow-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.flow-card .flow-sequence {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.flow-card .sequence-point {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.flow-card .sequence-arrow {
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    font-size: 14px;
}

.flow-card .no-points {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
}

.flow-builder {
    margin-top: 10px;
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.empty-flow-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.empty-flow-state i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-flow-state p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
}

.empty-flow-state span {
    font-size: 13px;
    margin-top: 4px;
}

.flow-points-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
}

.flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    font-size: 16px;
}

.flow-point-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    transition: all 0.2s ease;
    width: 100%;
    cursor: grab;
}

.flow-point-item:hover {
    background: var(--bg-secondary, rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.15);
}

.flow-point-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.flow-point-item.drag-over {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.15);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.flow-point-item .drag-handle {
    color: var(--text-muted, rgba(255, 255, 255, 0.3));
    cursor: grab;
    padding: 4px;
    margin-left: -4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: color 0.2s ease;
}

.flow-point-item:hover .drag-handle {
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

.flow-point-item.dragging .drag-handle {
    cursor: grabbing;
}

.flow-point-item .point-step {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.flow-point-item .point-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.flow-point-item .point-name {
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    font-size: 14px;
}

.flow-point-item .point-desc {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flow-point-item .btn-remove {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.flow-point-item .btn-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.available-points {
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    padding-top: 16px;
}

.available-points-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    margin-bottom: 12px;
}

.available-points-header i {
    font-size: 16px;
    color: var(--accent-primary, #3498db);
}

.points-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.point-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    background: var(--bg-secondary, rgba(255, 255, 255, 0.04));
    color: var(--text-primary, #ffffff);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.point-chip:hover {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.3);
    transform: translateY(-1px);
}

.point-chip .point-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.point-chip .point-chip-name {
    flex: 1;
}

.point-chip i {
    font-size: 14px;
    color: var(--accent-primary, #3498db);
}

.no-points-available {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin: 0;
    padding: 8px 0;
}

.no-points-available i {
    color: #2ecc71;
}

.flow-card-actions {
    padding: 12px 16px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    display: flex;
    gap: 8px;
}

.flow-card-actions .action-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.flow-card-actions .action-btn.edit {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.flow-card-actions .action-btn.edit:hover {
    background: rgba(52, 152, 219, 0.25);
}

.flow-card-actions .action-btn.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    flex: 0;
    padding: 8px 12px;
}

.flow-card-actions .action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Light Mode */
[data-theme="light"] .flow-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .flow-card .flow-sequence {
    justify-content: flex-start;
}

[data-theme="light"] .flow-card .sequence-point {
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .flow-card .sequence-arrow,
[data-theme="light"] .flow-card .no-points,
[data-theme="light"] .empty-flow-state,
[data-theme="light"] .no-points-available {
    color: #64748b;
}

[data-theme="light"] .empty-flow-state p {
    color: #334155;
}

[data-theme="light"] .flow-builder {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .flow-arrow {
    color: #94a3b8;
}

[data-theme="light"] .flow-point-item {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .flow-point-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

[data-theme="light"] .flow-point-item .point-name {
    color: #0f172a;
}

[data-theme="light"] .flow-point-item .point-desc {
    color: #64748b;
}

[data-theme="light"] .flow-point-item .btn-remove {
    color: #94a3b8;
}

[data-theme="light"] .available-points {
    border-color: #e2e8f0;
}

[data-theme="light"] .available-points-header {
    color: #475569;
}

[data-theme="light"] .point-chip {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
}

[data-theme="light"] .point-chip:hover {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
}

[data-theme="light"] .flow-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}


/* ============================================
   SCREEN CARDS
   POS screen grid layout cards
   ============================================ */

.screen-card {
    background: var(--bg-secondary, #1a1a2e);
    border-radius: 12px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.screen-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary-light, rgba(99, 102, 241, 0.3));
}

.screen-card-header {
    padding: 16px;
    padding-left: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
}

.screen-card .screen-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    font-size: 18px;
    flex-shrink: 0;
}

.screen-card .screen-title {
    flex: 1;
    min-width: 0;
}

.screen-card .screen-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin: 0 0 4px 0;
}

.screen-card .screen-description {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.screen-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.screen-card .screen-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.screen-card .detail-label {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.screen-card .screen-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.screen-card-actions {
    padding: 12px 16px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    display: flex;
    gap: 8px;
}

.screen-card-actions .action-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.screen-card-actions .action-btn.edit {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.screen-card-actions .action-btn.edit:hover {
    background: rgba(99, 102, 241, 0.25);
}

.screen-card-actions .action-btn.view {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.screen-card-actions .action-btn.view:hover {
    background: rgba(34, 197, 94, 0.25);
}

.screen-card-actions .action-btn.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    flex: 0;
    padding: 8px 12px;
}

.screen-card-actions .action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Light Mode */
[data-theme="light"] .screen-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .screen-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}


/* ============================================
   SHARED BADGES
   Status, category, feature badges
   ============================================ */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.available,
.status-badge.active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.status-badge.unavailable,
.status-badge.inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.price-badge {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.location-badge.shared {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.location-badge.specific {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
}

.location-badge.masked {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.feature-badge.print {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.feature-badge.screen {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.feature-badge.auto {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}


/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */

[data-theme="light"] .table-page-container,
[data-theme="light"] .card-page-container {
    background: var(--bg-card, #ffffff);
    border-color: var(--border-color, #e2e8f0);
}

[data-theme="light"] .table-page-header,
[data-theme="light"] .card-page-header {
    background: var(--bg-tertiary, #f8fafc);
    border-bottom-color: var(--border-color, #e2e8f0);
}

[data-theme="light"] .table-page-header .header-left h2,
[data-theme="light"] .card-page-header .header-left h2 {
    color: var(--text-primary, #1e293b);
}

[data-theme="light"] .table-page-header .item-count,
[data-theme="light"] .card-page-header .item-count {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted, #64748b);
}

[data-theme="light"] .table-search-box input,
[data-theme="light"] .card-search-box input {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

[data-theme="light"] .table-page-table thead {
    background: #f1f5f9;
}

[data-theme="light"] .table-page-table th {
    color: #475569;
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .table-page-table td {
    color: #1e293b;
    border-bottom-color: #f1f5f9;
}

[data-theme="light"] .table-page-table tbody tr:hover {
    background: #f8fafc;
}

[data-theme="light"] .page-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .page-card-header,
[data-theme="light"] .page-card-actions {
    background: #f8fafc;
}

[data-theme="light"] .page-card-icon {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .page-card-title h3 {
    color: #1e293b;
}


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

@media (max-width: 1024px) {
    .card-page-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .config-page {
        padding: 16px;
    }

    .config-page .page-header-content h1 {
        font-size: 24px;
    }

    .table-page-header,
    .card-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .table-page-header .header-left,
    .card-page-header .header-left {
        justify-content: space-between;
    }

    .table-page-header .header-right,
    .card-page-header .header-right {
        flex-direction: column;
        align-items: stretch;
    }

    .table-search-box input,
    .card-search-box input {
        width: 100%;
        min-width: unset;
    }

    .table-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .card-page-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }

    /* Mobile table as cards */
    .table-page-table.mobile-cards thead {
        display: none;
    }

    .table-page-table.mobile-cards tbody tr {
        display: block;
        margin-bottom: 16px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 16px;
    }

    .table-page-table.mobile-cards td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .table-page-table.mobile-cards td:first-child {
        padding-left: 0;
    }

    .table-page-table.mobile-cards td:last-child {
        padding-right: 0;
        border-bottom: none;
    }

    .table-page-table.mobile-cards td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 12px;
        text-transform: uppercase;
    }
}

@media (max-width: 480px) {
    .config-page {
        padding: 12px;
    }

    .table-page-header,
    .card-page-header {
        padding: 12px;
    }

    .card-page-grid {
        padding: 12px;
    }

    .page-card-actions {
        flex-wrap: wrap;
    }

    .page-card-actions .action-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* ============================================
   SETTINGS PAGE STYLES
   Modern, friendly settings layout
   ============================================ */

.restaurant-settings-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 900px;
}

/* Settings Sub-tabs */
.settings-subtabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.04));
    border-radius: 12px;
    margin-bottom: 8px;
}

.subtab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.subtab-btn i {
    font-size: 16px;
}

.subtab-btn:hover {
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.06));
    color: var(--text-primary, #ffffff);
}

.subtab-btn.active {
    background: var(--accent-primary, #3498db);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Settings Cards */
.settings-card {
    background: var(--bg-card, #1e1e2a);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

.settings-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(52, 152, 219, 0.05) 100%);
    color: var(--accent-primary, #3498db);
    flex-shrink: 0;
}

.settings-card-icon svg,
.settings-card-icon i {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.settings-card-icon.billing-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #10b981;
}

.settings-card-icon.tips-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    color: #8b5cf6;
}

.settings-card-icon.operations-icon {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0.05) 100%);
    color: #f97316;
}

.settings-card-icon.cash-drawer-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(236, 72, 153, 0.05) 100%);
    color: #ec4899;
}

.settings-card-icon.hours-icon {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
    color: #06b6d4;
}

.settings-card-title {
    flex: 1;
}

.settings-card-title h2 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.settings-card-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.settings-card-body {
    padding: 24px;
}

/* Form Layout */
.settings-form-row {
    margin-bottom: 20px;
}

.settings-form-row:last-child {
    margin-bottom: 0;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label-with-icon .label-icon,
.form-label-with-icon i {
    width: 16px;
    height: 16px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    margin-top: 4px;
}

/* Currency Selector */
.currency-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.currency-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.currency-option-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 2px solid var(--border-color, rgba(255, 255, 255, 0.12));
    border-radius: 10px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.04));
    color: var(--text-primary, #ffffff);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.currency-option-btn:hover {
    border-color: rgba(52, 152, 219, 0.4);
    background: rgba(52, 152, 219, 0.1);
}

.currency-option-btn.selected {
    border-color: var(--accent-primary, #3498db);
    background: rgba(52, 152, 219, 0.15);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.currency-symbol {
    font-weight: 700;
    font-size: 16px;
}

.currency-code {
    font-size: 13px;
    opacity: 0.8;
}

/* Tips Section */
.tips-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin-bottom: 4px;
}

.section-help {
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin: 0 0 12px 0;
}

.tip-presets-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tip-preset-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 10px;
}

.tip-input {
    width: 60px;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text-primary, #ffffff);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.tip-input:focus {
    outline: none;
}

.tip-percent {
    font-size: 14px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

/* Auto Gratuity */
.auto-gratuity-section-modern {
    padding-top: 20px;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

.auto-gratuity-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auto-gratuity-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auto-gratuity-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.auto-gratuity-desc {
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.auto-gratuity-settings {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
    border-radius: 10px;
}

.auto-gratuity-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.auto-gratuity-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-suffix .form-control {
    flex: 1;
}

.input-suffix {
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    white-space: nowrap;
}

/* Operations Grid */
.operations-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.operation-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.operation-item:hover {
    background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.1);
}

.operation-item.enabled {
    background: rgba(52, 152, 219, 0.08);
    border-color: rgba(52, 152, 219, 0.2);
}

.operation-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.06));
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    flex-shrink: 0;
}

.operation-item.enabled .operation-icon {
    background: rgba(52, 152, 219, 0.15);
    color: var(--accent-primary, #3498db);
}

.operation-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.feature-desc {
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

/* Modern Toggle */
.modern-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.modern-toggle input {
    display: none;
}

.modern-toggle .toggle-slider {
    width: 48px;
    height: 26px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 13px;
    position: relative;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.modern-toggle .toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modern-toggle input:checked + .toggle-slider {
    background: var(--accent-success, #10b981);
}

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

.modern-toggle.small .toggle-slider {
    width: 40px;
    height: 22px;
    border-radius: 11px;
}

.modern-toggle.small .toggle-slider::before {
    width: 16px;
    height: 16px;
    top: 3px;
    left: 3px;
}

.modern-toggle.small input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

.toggle-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

/* Cash Drawer */
.cash-drawer-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cash-drawer-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
    border-radius: 10px;
}

.option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.option-desc {
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.cash-drawer-info-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(52, 152, 219, 0.08);
    border: 1px solid rgba(52, 152, 219, 0.15);
    border-radius: 10px;
}

.cash-drawer-info-box svg {
    flex-shrink: 0;
    color: var(--accent-primary, #3498db);
}

.info-content {
    flex: 1;
}

.info-content p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--text-primary, #ffffff);
}

.info-content ul {
    margin: 0;
    padding-left: 20px;
}

.info-content li {
    font-size: 13px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    margin-bottom: 4px;
}

.drawer-management-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--accent-primary, #3498db);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.drawer-management-link:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.drawer-management-link .arrow-icon {
    margin-left: auto;
}

/* Operating Hours */
.hours-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hours-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 16px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hours-row:hover {
    background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
}

.hours-row.closed {
    opacity: 0.6;
}

.hours-day {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 140px;
}

.day-toggle {
    display: inline-flex;
    cursor: pointer;
}

.day-toggle input {
    display: none;
}

.day-toggle .toggle-slider {
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s ease;
}

.day-toggle .toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.day-toggle input:checked + .toggle-slider {
    background: var(--accent-success, #10b981);
}

.day-toggle input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

.day-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.hours-times {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.time-input-group label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.time-input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
    color: var(--text-primary, #ffffff);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.time-input:focus {
    outline: none;
    border-color: var(--accent-primary, #3498db);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.time-separator {
    color: var(--text-muted, rgba(255, 255, 255, 0.3));
    padding-top: 20px;
}

.hours-closed-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    font-size: 14px;
    font-style: italic;
}

/* Save Button */
.save-button-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card, #1e1e2a);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
}

.save-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent-primary, #3498db) 0%, #2980b9 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.save-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.save-btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.save-success-message {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #10b981;
    font-size: 14px;
    font-weight: 500;
}

/* Light Mode */
[data-theme="light"] .settings-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .settings-card-header {
    background: #f8fafc;
}

[data-theme="light"] .settings-subtabs {
    background: #f1f5f9;
}

[data-theme="light"] .subtab-btn {
    color: #64748b;
}

[data-theme="light"] .subtab-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

[data-theme="light"] .subtab-btn.active {
    background: var(--accent-primary, #3498db);
    color: white;
}

[data-theme="light"] .operation-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .hours-row {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .save-button-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

/* Responsive */
@media (max-width: 768px) {
    .settings-subtabs {
        flex-wrap: wrap;
    }
    
    .subtab-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .subtab-btn span {
        display: none;
    }
    
    .settings-form-row.two-columns {
        grid-template-columns: 1fr;
    }
    
    .settings-card-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .auto-gratuity-settings {
        flex-direction: column;
    }
    
    .hours-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .hours-day {
        justify-content: space-between;
    }
    
    .hours-times {
        justify-content: center;
    }
}