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



:root {
    --sidebar-bg: #214238;
    --sidebar-hover: #2f5a4d;
    --sidebar-text: #f7f3e8;
    --primary-color: #2f7d5b;
    --primary-hover: #27684c;
    --danger-color: #b4534a;
    --success-color: #3f8f67;
    --warning-color: #c79543;
    --accent-color: #7aa874;
    --bg-light: #f7f3e8;
    --surface-color: #fffdf6;
    --surface-soft: #f1eadb;
    --border-color: #ddd3be;
    --text-dark: #263b32;
    --text-gray: #6b7b70;
}


/* ── Cashier mode badge ──────────────────────────────────────────────────── */
.cashier-mode-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(184,154,58,0.15);
    border: 1px solid rgba(184,154,58,0.4);
    border-radius: 7px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #7a6520;
    margin-left: 8px;
}


.cashier-mode-badge button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: inherit;
    padding: 0 2px;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.cashier-mode-badge button:hover { opacity: 1; }


html {
    direction: rtl;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(122, 168, 116, 0.18), transparent 34%),
        var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

body.ltr {
    direction: ltr;
}

body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl th {
    text-align: right;
}

body.rtl .layout {
    flex-direction: row;
}

body.rtl .sale-line,
body.rtl .form-grid,
body.rtl .two-column,
body.rtl .workspace-grid,
body.rtl .module-grid {
    direction: rtl;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Layout */
.layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.layout.full-page {
    height: auto;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    min-width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: width 0.25s ease, min-width 0.25s ease;
}

/* ── Sidebar collapsed state ── */
.layout.sidebar-collapsed .sidebar {
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden;
}

/* ── Sidebar toggle button (auto-injected into .navbar) ── */
.sidebar-toggle-btn {
    background: none;
    border: 1.5px solid var(--border-color);
    border-radius: 7px;
    cursor: pointer;
    padding: 5px 9px;
    font-size: 17px;
    line-height: 1;
    color: var(--text-dark);
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
    margin-right: 10px;
}
.sidebar-toggle-btn:hover {
    background: var(--border-color);
    border-color: var(--text-gray);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 5px;
}

.sidebar-store-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    list-style: none;
}

.menu-item {
    padding: 0;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--sidebar-text);
    transition: all 0.3s;
    font-size: 14px;
}

.menu-item a:hover {
    background-color: var(--sidebar-hover);
    padding-right: 25px;
}

.menu-item a.active {
    background-color: var(--primary-color);
    color: white;
    border-right: 4px solid white;
    font-weight: 600;
}

.menu-icon {
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    width: 100%;
    padding: 10px 15px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #dc2626;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.navbar {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.navbar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-brand,
.user-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.navbar-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}

.navbar-brand-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
}

.user-name {
    color: var(--text-gray);
    font-size: 14px;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    background: var(--surface-soft);
    border: 1px solid var(--border-color);
    border-radius: 999px;
}

.language-switcher button {
    padding: 6px 10px;
    border-radius: 999px;
    background: transparent;
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 800;
}

.language-switcher button.active {
    background: var(--surface-color);
    color: var(--primary-color);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Content Area */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    margin-top: 5px;
}

/* Cards */
.card {
    background: var(--surface-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background-color: var(--surface-soft);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--primary-color);
    min-width: 0;
    overflow: hidden;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: clamp(16px, 2.2vw, 28px);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.stat-subtitle {
    font-size: 12px;
    color: var(--text-gray);
    word-break: break-word;
}

.stat-card.success { border-top-color: var(--success-color); }
.stat-card.warning { border-top-color: var(--warning-color); }
.stat-card.danger { border-top-color: var(--danger-color); }

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background-color: var(--surface-soft);
}

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

td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background-color: #f5efdf;
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

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

.btn-secondary {
    background-color: var(--surface-soft);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #ebe2cf;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

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

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: #dceede;
    color: #24583c;
}

.badge-warning {
    background-color: #f6ebc8;
    color: #7a581d;
}

.badge-danger {
    background-color: #f5d8d2;
    color: #7f332d;
}

.badge-info {
    background-color: #ddebd9;
    color: #2c5f43;
}

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

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

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

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(47, 125, 91, 0.14);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Loading & Empty States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    flex-direction: column;
    color: var(--text-gray);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

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

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    margin-bottom: 20px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background-color: #dceede;
    color: #24583c;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: #f5d8d2;
    color: #7f332d;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: #f6ebc8;
    color: #7a581d;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background-color: #ddebd9;
    color: #2c5f43;
    border-left: 4px solid var(--primary-color);
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-gray);
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

/* Responsive */
/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet & Mobile
═══════════════════════════════════════════════════════════════ */

/* Touch devices — bigger tap targets & prevent iOS zoom on inputs */
@media (pointer: coarse) {
    .btn { min-height: 42px; }
    .menu-item a { min-height: 46px; display: flex; align-items: center; }
    input, select, textarea { min-height: 42px; font-size: 16px !important; }
}

/* ── Tablet landscape / small laptop (≤1024px) ── */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .module-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablet portrait & mobile (≤768px) ── */
@media (max-width: 768px) {
    /* Sidebar becomes a slide-over overlay drawer */
    .sidebar {
        position: fixed !important;
        top: 0;
        left: -270px !important;
        height: 100vh !important;
        width: 270px !important;
        min-width: 270px !important;
        transition: left 0.3s ease !important;
        z-index: 1001;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Desktop collapse has no effect on mobile */
    .layout.sidebar-collapsed .sidebar {
        left: -270px !important;
        width: 270px !important;
        min-width: 270px !important;
    }

    /* Drawer open state */
    .layout.sidebar-open .sidebar {
        left: 0 !important;
    }

    /* Semi-transparent backdrop behind open drawer */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 1000;
        cursor: pointer;
    }
    .layout.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .layout { flex-direction: column; }
    .main-content { width: 100%; overflow-x: hidden; }

    /* Navbar */
    .navbar { padding: 10px 12px; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
    .navbar-brand-text { display: none; }
    .scope-pill { display: none; }
    .user-name { display: none; }
    .user-section { gap: 6px; }

    /* Content */
    .content { padding: 12px; }

    /* Grids */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .module-grid { grid-template-columns: 1fr; }
    .store-cards-grid { grid-template-columns: 1fr; }

    /* Tables: always horizontally scrollable */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 4px;
    }
    table { min-width: 480px; font-size: 12px; }
    th, td { padding: 8px 10px; }

    /* Forms */
    .form-grid { grid-template-columns: 1fr !important; }
    .two-column { grid-template-columns: 1fr !important; }

    /* Modals */
    .modal-overlay { padding: 10px; align-items: flex-end; }
    .modal-box {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        overflow-y: auto;
        border-radius: 16px 16px 0 0;
        margin: 0;
    }

    /* Page header */
    .page-header { flex-direction: column; gap: 10px; align-items: flex-start; }
    .page-header .btn { width: 100%; justify-content: center; }

    /* Cashier section table wrapper */
    #cashierSection .table-wrapper { overflow-x: auto; }
}

/* ── Phone (≤480px) ── */
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .workspace-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
    .content { padding: 8px; }
    .card { border-radius: 8px; }
    .navbar { padding: 8px 10px; }
    .sidebar-toggle-btn { padding: 5px 7px; font-size: 15px; }
    .store-cards-grid { grid-template-columns: 1fr; gap: 14px; }
    .module-grid { grid-template-columns: 1fr; }
    /* POS: payment options row becomes column */
    .payment-options { flex-direction: column; }
    /* Login card full width */
    .login-card { width: 100%; max-width: 100%; padding: 24px 16px; }
    .login-container { padding: 10px; align-items: flex-start; padding-top: 20px; }
}

/* Loading Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background:
        linear-gradient(rgba(33, 66, 56, 0.72), rgba(33, 66, 56, 0.72)),
        url('https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    padding: 24px;
}

.login-card {
    background: rgba(255, 253, 246, 0.97);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 20px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.login-subtitle {
    color: var(--text-gray);
    margin-bottom: 30px;
    font-size: 14px;
}

body.dark .login-card {
    background: rgba(28, 40, 33, 0.97);
}

body.dark .login-demo-hint {
    background: #1a2e22;
    color: #8da898;
    border-color: #2e4a3c;
}

/* Store Selection */
.store-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.store-card {
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.store-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.store-card-icon {
    height: 94px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    background: linear-gradient(135deg, #2f7d5b 0%, #7aa874 100%);
}

/* Proposal-aligned frontend prototype */
.app-shell-note {
    background: #eef5e8;
    color: #31533f;
    border: 1px solid #c9dcbf;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 20px;
}

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

.metric-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    min-width: 0;
    overflow: hidden;
}

.metric-card strong {
    display: block;
    font-size: clamp(14px, 1.8vw, 24px);
    color: var(--text-dark);
    margin: 6px 0 2px;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.metric-card span {
    color: var(--text-gray);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

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

.module-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
}

.module-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.module-card p {
    color: var(--text-gray);
    font-size: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
    gap: 20px;
    align-items: start;
}

.sale-line {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 0.8fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
}

.summary-line:last-child {
    border-bottom: 0;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.payment-option {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    background: var(--surface-color);
}

.payment-option input {
    width: auto;
    margin-left: 8px;
}

.scope-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eaf4e6;
    color: #31533f;
    border: 1px solid #c9dcbf;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.inventory-theme .sidebar {
    background: #1f4a3f;
}

.inventory-theme .sidebar-store-name,
.inventory-theme .menu-item a.active {
    color: white;
}

.inventory-theme .menu-item a.active {
    background: #3f8f67;
}

.inventory-theme .user-avatar,
.inventory-theme .btn-primary,
.inventory-theme .filter-btn.active {
    background-color: #3f8f67;
}

.inventory-theme .btn-primary:hover {
    background-color: #2f7d5b;
}

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

    .payment-options {
        grid-template-columns: 1fr;
    }
}

.store-card-wrapper:nth-child(2) .store-card-icon {
    background: linear-gradient(135deg, #3f8f67 0%, #b7cfa3 100%);
}

.store-card-wrapper:nth-child(3) .store-card-icon {
    background: linear-gradient(135deg, #6d9f71 0%, #d8d0a8 100%);
}

.store-card-wrapper:nth-child(4) .store-card-icon {
    background: linear-gradient(135deg, #2f7d5b 0%, #c8b98d 100%);
}

.store-card-wrapper:nth-child(5) .store-card-icon {
    background: linear-gradient(135deg, #214238 0%, #9bbf8a 100%);
}

.store-card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.store-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.store-card-description {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.5;
    flex-grow: 1;
}

.store-card-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 13px;
}

.store-card-wrapper {
    position: relative;
}

.store-rename-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    z-index: 2;
}

.store-card-wrapper:hover .store-rename-btn {
    opacity: 1;
}

.store-rename-btn:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.store-rename-input {
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--bg-color);
    border: 1.5px solid var(--primary-color);
    border-radius: 5px;
    padding: 2px 6px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
}
