.user-table{

background:var(--card-bg);

border-radius:15px;

overflow:hidden;

}



.user-info{

display:flex;

align-items:center;

gap:12px;

}



.avatar{

width:42px;

height:42px;

border-radius:50%;

background:#334155;

display:flex;

align-items:center;

justify-content:center;

}



.purchase-badge{

background:#0ea5e9;

color:white;

padding:5px 12px;

border-radius:20px;

font-size:13px;

}



.table thead th{

background:#1e293b;

color:white;

border:none;

}



.table tbody tr{

vertical-align:middle;

}



.table tbody tr:hover{

background:rgba(255,255,255,.05);

}


.user-avatar{

    width:42px;

    height:42px;

    border-radius:50%;

    background:#334155;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:20px;

}

.admin-table{

    background:var(--card-bg);

    border-radius:12px;

    overflow:hidden;

}


.admin-table thead th{

    background:#1e293b;

    color:white;

    padding:14px;

    border:none;

}


.admin-table tbody td{

    padding:14px;

}


.admin-table tbody tr:hover{

    background:rgba(255,255,255,.05);

}


/* USER TABLE */

.admin-table{

    border-collapse:separate;

    border-spacing:0 8px;

}


.admin-table thead th{

    background:#1e293b;

    color:white;

    border:none;

    padding:14px;

}


.user-row{

    background:var(--card-bg);

    transition:.2s;

}


.user-row:hover{

    transform:translateY(-2px);

}


.user-row td{

    padding:14px;

    border:none;

}


.user-avatar{

    width:45px;

    height:45px;

    border-radius:50%;

    background:#334155;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:22px;

}


.email-text{

    color:#94a3b8;

}


.edit-btn{

    background:#0ea5e9;

    color:white;

    border:none;

    border-radius:10px;

    padding:6px 16px;

    box-shadow:0 3px 8px rgba(0,0,0,.2);

}


.edit-btn:hover{

    background:#0284c7;

}




.search-box{

    max-width:400px;

}


.admin-sidebar{

    min-height:100vh;

    background:#0f172a;

}


.sidebar-menu{

    padding:15px;

}


.sidebar-item{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:12px 15px;

    margin-bottom:8px;

    border-radius:10px;

    color:#cbd5e1;

    text-decoration:none;

    transition:.2s;

}


.sidebar-item:hover{

    background:#1e293b;

    color:white;

}


.sidebar-item.disabled{

    opacity:.5;

    cursor:not-allowed;

}


.sidebar-item span{

    font-size:11px;

    background:#334155;

    padding:3px 7px;

    border-radius:10px;

}

.sidebar-item.active{

    background:#2563eb;

    color:white;

}

/* ==========================
   ADMIN DASHBOARD
========================== */


.admin-dashboard{

    padding:10px;

}



.dashboard-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:20px;

    margin-bottom:25px;

}


.dashboard-header h2{

    font-weight:700;

    color:var(--text-color);

}



.dashboard-header p{

    color:#6b7280;

}



/* Summary Cards */

.dashboard-summary{

    display:grid;

    grid-template-columns:
    repeat(3,1fr);

    gap:20px;

    margin-bottom:30px;

}



.summary-card{

    background:var(--card-color);

    border:1px solid var(--border-color);

    border-radius:16px;

    padding:25px;

    box-shadow:
    0 5px 15px rgba(0,0,0,.08);

}



.summary-card h5{

    color:var(--text-color);

    font-size:16px;

}



.summary-card h2{

    margin-top:15px;

    font-size:32px;

    font-weight:700;

    color:#2563eb;

}





/* Shop Table Box */


.dashboard-box{

    background:var(--card-color);

    border:1px solid var(--border-color);

    border-radius:16px;

    padding:25px;

}



.dashboard-box h4{

    margin-bottom:20px;

    font-weight:700;

}



.dashboard-box table{

    margin-bottom:0;

}



/* Responsive */


@media(max-width:900px){


.dashboard-summary{

    grid-template-columns:1fr;

}


}


/* =====================
   SHOP DASHBOARD TABLE
===================== */


.shop-table-wrapper{

    background:var(--card-color);

    border:1px solid var(--border-color);

    border-radius:16px;

    padding:20px;

    overflow:hidden;

}



.shop-dashboard-table{

    width:100%;

    border-collapse:separate;

    border-spacing:0 10px;

}



.shop-dashboard-table thead th{

    color:var(--text-color);

    font-size:14px;

    padding:12px;

    border-bottom:1px solid var(--border-color);

}



.shop-dashboard-table tbody tr{

    background:var(--card-color);

    transition:.2s;

}



.shop-dashboard-table tbody tr:hover{

    transform:translateY(-2px);

    box-shadow:
    0 5px 15px rgba(0,0,0,.08);

}



.shop-dashboard-table td{

    padding:15px;

    color:var(--text-color);

}



.shop-name{

    font-weight:700;

    font-size:16px;

}



.shop-dashboard-table small{

    color:#6b7280;

}



.number-badge{

    background:#2563eb;

    color:white;

    padding:6px 12px;

    border-radius:20px;

    font-weight:600;

}

.admin-content{

    min-width:0;

}

/* =====================
   ADMIN LAYOUT FIX
===================== */

.admin-sidebar{

    flex:0 0 230px;

}


.admin-content{

    flex:1;

    min-width:0;

}


.row.g-0{

    display:flex;

    flex-wrap:nowrap;

}


/* =====================
   ADMIN MAIN LAYOUT
===================== */


.admin-layout{

    display:flex;

    flex-direction:row;

    min-height:100vh;

}



.admin-sidebar{

    width:230px;

    flex-shrink:0;

    min-height:100vh;

}



.admin-content{

    flex:1;

    min-width:0;

    padding:25px;

}

.dashboard-actions{
    display:flex;
    justify-content:flex-end;
    margin-bottom:20px;
}


.admin-action-btn{

    display:flex;

    align-items:center;

    gap:8px;


    background:linear-gradient(
        135deg,
        #2563eb,
        #3b82f6
    );


    color:white !important;

    padding:12px 20px;

    border-radius:12px;


    font-size:15px;

    font-weight:700;

    text-decoration:none;


    box-shadow:
        0 8px 20px rgba(37,99,235,.25);


    transition:.25s;

}


.admin-action-btn:hover{

    transform:translateY(-2px);

    box-shadow:
        0 12px 25px rgba(37,99,235,.35);

}


.manager-list{
    display:flex;
    flex-direction:column;
    gap:4px;
    font-size:14px;
}


.manager-list div{
    padding:4px 8px;
    border-radius:8px;
    background:rgba(128,128,128,.12);
    width:max-content;
}



.shop-btn.view{

    background:#2563eb;

    color:white;

    align-items:center;

}


.shop-btn.setting{

    background:#f59e0b;

    color:white;

    align-items:center;

}


.shop-btn:hover{

    transform:translateY(-2px);

    filter:brightness(1.05);

}


.shop-card-grid{

    display:grid;

    grid-template-columns:
    repeat(auto-fit,minmax(320px,1fr));

    gap:20px;

}



.admin-shop-card{

    background:var(--card-bg);

    border-radius:18px;

    padding:20px;

    border:1px solid var(--border-color);

    box-shadow:
        0 6px 18px rgba(0,0,0,.06);

    transition:.25s;

}



.admin-shop-card:hover{

    transform:translateY(-4px);

}

/* Dark Mode Shop Card */
body.dark .admin-shop-card{

    background:#1f2937;

    border-color:#374151;

    color:#f9fafb;

}


/* ชื่อร้าน */
body.dark .admin-shop-card h3{

    color:#ffffff;

}


/* รายละเอียด */
body.dark .admin-shop-card p{

    color:#d1d5db;

}


/* ข้อความเล็ก */
body.dark .admin-shop-card small{

    color:#9ca3af;

}


/* ผู้ดูแล / Staff */
body.dark .admin-shop-card strong{

    color:#ffffff;

}

[data-theme="dark"] .admin-shop-card{
    color:#f9fafb;
}

[data-theme="dark"] .admin-shop-card h3{
    color:#ffffff;
}

[data-theme="dark"] .admin-shop-card p{
    color:#d1d5db;
}


.shop-card-header{

    display:flex;

    justify-content:space-between;

    align-items:flex-start;

    margin-bottom:18px;

}



.shop-card-header h3{

    margin:0;

    font-size:20px;

    font-weight:800;

}

[data-theme="dark"] .admin-shop-card{

    background:#1f2937;

    border-color:#374151;

}

.shop-card-header small{

    opacity:.6;

}



.shop-status{

    background:#16a34a;

    color:white;

    padding:5px 12px;

    border-radius:20px;

    font-size:12px;

    font-weight:bold;

}



.shop-managers{

    margin-bottom:20px;

}



.shop-managers h5{

    font-size:14px;

    margin-bottom:10px;

}



.manager-item{

    display:flex;

    justify-content:space-between;

    padding:7px 10px;

    border-radius:10px;

    background:rgba(128,128,128,.12);

    margin-bottom:6px;

}



.manager-item small{

    opacity:.7;

}




.shop-stat-row{

    display:grid;

    grid-template-columns:
    repeat(3,1fr);

    gap:8px;

    margin-bottom:20px;

}



.shop-stat-row div{

    background:rgba(128,128,128,.1);

    padding:10px;

    border-radius:12px;

    text-align:center;

    font-size:13px;

}








.shop-btn{

    display:flex;

    align-items:center;

    justify-content:center;

    text-align:center;

    gap:6px;

    height:44px;

    border-radius:12px;

    font-weight:800;

    text-decoration:none;

    box-sizing:border-box;

}








.admin-create-page{

    display:flex;

    justify-content:center;

    padding:40px 20px;

}



.create-card{

    width:100%;

    max-width:720px;

    background:var(--card-bg);

    border-radius:22px;

    padding:30px;

    border:1px solid rgba(255,255,255,.08);

    box-shadow:
    0 15px 40px rgba(0,0,0,.25);

}



.create-header{

    display:flex;

    align-items:center;

    gap:18px;

    margin-bottom:30px;

}



.create-icon{

    width:60px;

    height:60px;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:30px;

    border-radius:18px;

    background:#2563eb;

}



.create-header h2{

    margin:0;

    font-weight:800;

}



.create-header p{

    margin:5px 0 0;

    opacity:.7;

}





.form-group{

    margin-bottom:20px;

}



.form-group label{

    display:block;

    margin-bottom:8px;

    font-weight:700;

}



.create-input{

    width:100%;

    padding:12px 15px;

    border-radius:12px;

    border:1px solid rgba(128,128,128,.25);

    background:rgba(128,128,128,.08);

    color:inherit;

}



.create-input:focus{

    outline:none;

    border-color:#2563eb;

}



.form-row{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:20px;

}





.create-actions{

    display:flex;

    justify-content:flex-end;

    gap:12px;

    margin-top:25px;

}



.create-btn{

    border:none;

    padding:12px 25px;

    border-radius:12px;

    background:linear-gradient(
        135deg,
        #2563eb,
        #3b82f6
    );

    color:white;

    font-weight:800;

    cursor:pointer;

}



.cancel-btn{

    padding:12px 25px;

    border-radius:12px;

    background:rgba(128,128,128,.2);

    color:inherit;

    text-decoration:none;

    font-weight:700;

}

.owner-select{

    color:inherit;

    background:var(--input-bg);

}



.owner-select option{

    background:#ffffff;

    color:#111827;

}

body.dark-mode .owner-select{

    background:#1f2937;

    color:#ffffff;

}


body.dark-mode .owner-select option{

    background:#1f2937;

    color:#ffffff;

}


.danger-zone{

    margin-top:30px;

    padding:20px;

    border-radius:16px;

    background:rgba(220,38,38,.12);

    border:1px solid rgba(220,38,38,.3);

}


.danger-zone p{

    opacity:.75;

}


.shop-setting-page{

    max-width:900px;

    margin:auto;

    padding:30px;

}



.setting-header{

    display:flex;

    align-items:center;

    gap:18px;

    margin-bottom:30px;

}



.setting-icon{

    width:65px;

    height:65px;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:32px;

    border-radius:18px;

    background:#2563eb;

}



.setting-header h2{

    font-weight:900;

    margin:0;

}



.setting-header p{

    opacity:.7;

}



.setting-card{

    background:var(--card-bg);

    border-radius:20px;

    padding:25px;

    margin-bottom:25px;

    border:1px solid var(--border-color);

    box-shadow:
        0 4px 15px rgba(0,0,0,.05);

    transition:.2s;

}



.setting-card:hover{

    transform:translateY(-2px);

    box-shadow:
        0 8px 25px rgba(0,0,0,.08);

}


.setting-card h4{

    font-weight:800;

    margin-bottom:20px;

}

.setting-card h4{

    display:flex;

    align-items:center;

    gap:8px;

    padding-bottom:15px;

    border-bottom:1px solid var(--border-color);

    margin-bottom:20px;

}

.save-btn{

    background:linear-gradient(
        135deg,
        #2563eb,
        #3b82f6
    );

    color:white;

    border:none;

    padding:12px 24px;

    border-radius:12px;

    font-weight:800;

}



.save-btn:hover{

    transform:translateY(-2px);

}


.danger-zone{

    background:rgba(220,38,38,.12);

    border:1px solid rgba(220,38,38,.35);

    border-radius:18px;

    padding:25px;

}


.danger-zone h4{

    color:#ef4444;

    font-weight:800;

}


/* =========================
   SHOP SETTINGS FORM
========================= */


.shop-setting-page form{

    display:flex;

    flex-direction:column;

    gap:18px;

}



.shop-setting-page label{

    font-weight:700;

    margin-bottom:6px;

    color:var(--text-color);

}



.shop-setting-page .form-control,
.shop-setting-page .form-select{

    width:100%;

    padding:14px 16px;

    border-radius:14px;

    border:1px solid var(--border-color);

    background:rgba(128,128,128,.08);

    color:var(--text-color);

    transition:.2s;

}



.shop-setting-page textarea{

    min-height:120px;

    resize:vertical;

}



.shop-setting-page .form-control:focus,
.shop-setting-page .form-select:focus{

    outline:none;

    border-color:#2563eb;

    box-shadow:
    0 0 0 3px rgba(37,99,235,.15);

}




/* ปุ่มทุกส่วน */

.setting-btn{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    gap:8px;

    width:180px;   /* เพิ่ม */

    height:46px;   /* เปลี่ยนจาก min-height */

    padding:0;

    border-radius:12px;

    border:none;

    font-weight:800;

    cursor:pointer;

    text-decoration:none;

    margin-top:12px;

    transition:.2s;

    box-sizing:border-box;

}



.setting-btn:hover{

    transform:translateY(-2px);

}




.btn-save{

    background:linear-gradient(
        135deg,
        #2563eb,
        #3b82f6
    );

    color:white;

}



.btn-warning-custom{

    background:#f59e0b;

    color:white;

}



.btn-info-custom{

    background:#0891b2;

    color:white;

    min-width:160px;

    height:46px;

}



.btn-info-custom:hover{

    color:white;

    filter:brightness(1.1);

}




/* ระยะห่างระหว่าง Input กับปุ่ม */

.setting-card form button{

    margin-top:15px;

}


/* =====================
   SHOP STAFF LIST
===================== */


.staff-list{

    display:flex;

    flex-direction:column;

    gap:10px;

    margin-top:15px;

    margin-bottom:20px;

}



.staff-item{

    background:rgba(128,128,128,.12);

    padding:12px 16px;

    border-radius:12px;

    font-weight:700;

}



.no-staff{

    padding:15px;

    border-radius:12px;

    background:rgba(128,128,128,.08);

    color:#94a3b8;

    font-style:italic;

}



.staff-list{

    display:flex;

    flex-direction:column;

    gap:10px;

    margin-top:15px;

    margin-bottom:20px;

}


.staff-item{

    display:flex;

    align-items:center;

    padding:12px 16px;

    border-radius:12px;

    background:rgba(128,128,128,.12);

    font-weight:700;

}


.no-staff{

    padding:12px 16px;

    border-radius:12px;

    background:rgba(128,128,128,.08);

    color:#94a3b8;

    font-style:italic;

}

/* =====================
   SHOP SETTING SELECT
===================== */


.setting-select{

    width:100%;

    padding:14px 16px;

    border-radius:14px;

    border:1px solid var(--border-color);

    background:var(--card-bg);

    color:var(--text-color);

    font-weight:600;

    cursor:pointer;

    appearance:auto;

}



.setting-select:focus{

    outline:none;

    border-color:#2563eb;

    box-shadow:
    0 0 0 3px rgba(37,99,235,.15);

}



.setting-select option{

    background:#ffffff;

    color:#111827;

}



/* Dark Mode */

body.dark-mode .setting-select{

    background:#1e293b;

    color:#ffffff;

}



body.dark-mode .setting-select option{

    background:#1e293b;

    color:#ffffff;

}



.setting-btn.btn-info-custom:hover{

    color:white;

    filter:brightness(1.1);

    transform:translateY(-2px);

}


.shop-action-row{

    display:flex;

    gap:12px;

    width:100%;

    margin-bottom:12px;

}


.shop-action-row .shop-btn{

    flex:1;

    text-align:center;

}


.shop-card-actions{

    display:flex;

    flex-direction:column;

    gap:12px;

}


.shop-action-row{

    display:flex;

    gap:12px;

    width:100%;

}


.shop-action-row .shop-btn{

    flex:1;

}



/* Products Button */

.shop-btn.product{

    background:#f80000;

    color:white;

}


.shop-btn.product:hover{

    background:#f80000;

}



/* Pricing Button */

.shop-btn.pricing{

    background:#16a34a;

    color:white;

}


.shop-btn.pricing:hover{

    background:#15803d;

}

.shop-btn.product,
.shop-btn.pricing{

    border:none;

    border-radius:12px;

    font-weight:800;

    text-decoration:none;

    display:flex;

    align-items:center;

    justify-content:center;

    min-height:44px;

}


.shop-card{

    background:#ffffff;

    border:1px solid #e5e7eb;

    border-radius:18px;

    padding:20px;

    box-shadow:0 8px 20px rgba(0,0,0,0.06);

    transition:.2s;

}


.shop-card:hover{

    transform:translateY(-3px);

    box-shadow:0 12px 28px rgba(0,0,0,0.10);

}

body.dark .shop-card{

    background:#1f2937;

    border:1px solid #374151;

    box-shadow:none;

}


[data-theme="dark"] .admin-shop-card h3{

    color:#ffffff;

}


[data-theme="dark"] .admin-shop-card h5{

    color:#ffffff;

}


[data-theme="dark"] .admin-shop-card small{

    color:#cbd5e1;

}