
:root{
    --navy:#0b4f8a;
    --navy-dark:#083a66;
    --navy-soft:#eef5fb;
    --border:#d9e2ec;
    --text:#1f2937;
    --muted:#6b7280;
    --danger:#c62828;
    --success:#0f766e;
    --warning:#d97706;
    --bg:#f5f7fa;
    --card:#ffffff;
    --radius:10px;
    --shadow:0 2px 10px rgba(0,0,0,.08);
}

html,body{
    margin:0;
    padding:0;
    width:100%;
    min-height:100%;
    box-sizing:border-box;
    background:var(--bg);
    color:var(--text);
}

*,*::before,*::after{
    box-sizing:border-box;
}

@font-face{
    font-family:Pyidaungsu;
    src:local('Pyidaungsu'), url('font/Pyidaungsu.ttf') format('truetype');
    font-weight:normal;
    font-style:normal;
}

body{
    font-family:Pyidaungsu, Arial, sans-serif;
    overflow-x:hidden;
}

.maindiv{
    width:100%;
    min-height:100vh;
    background:var(--bg);
}

/* ===== TOP BAR ===== */
.topbar{
    width:100%;
    min-height:52px;
    background:linear-gradient(90deg,var(--navy-dark),var(--navy));
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:8px 14px;
    position:sticky;
    top:0;
    z-index:1000;
    box-shadow:0 2px 8px rgba(0,0,0,.18);
}

.developdiv{
    width:auto;
    float:none;
    margin:0;
}

.develop{
    margin:0;
    padding:0;
    float:none;
    color:#fff;
    font-family:'Times New Roman';
    font-weight:700;
    font-size:18px;
    letter-spacing:.3px;
}

.subtopbar{
    width:auto;
    padding:0;
}

.subtopbarright{
    float:none;
    width:auto;
    min-width:0;
    height:auto;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:6px;
    flex-wrap:wrap;
}

#timediv,.logout,.welcome{
    font-family:'Times New Roman';
    color:#fff;
    font-size:15px;
    text-decoration:none;
    cursor:pointer;
}

.logout{
    font-weight:700;
}

.logout:hover{ color:#ffd2d2; }
.welcome:hover,#timediv:hover{ opacity:.78; }

.minimenutbl{ display:none; }
.menubtn{
    color:#fff;
    font-size:18px;
    font-weight:700;
    cursor:pointer;
}

/* ===== APP LAYOUT ===== */
.leftmenu{
    float:left;
    width:112px;
    min-height:calc(100vh - 52px);
    background:#fff;
    border-right:1px solid var(--border);
    overflow-y:auto;
    overflow-x:hidden;
    position:sticky;
    top:52px;
}

.rightmenu{
    float:left;
    width:calc(100% - 112px);
    min-height:calc(100vh - 52px);
    overflow-x:auto;
    overflow-y:visible;
    background:var(--bg);
    box-shadow:none;
    padding-bottom:20px;
}

/* ===== SIDEBAR ===== */
.leftdata{
    width:94%;
    margin:5px auto;
    padding:6px 3px;
    border-radius:8px;
    cursor:pointer;
    border-bottom:1px solid #f3b3b3;
    text-align:center;
    transition:.16s ease;
}

.leftdata:hover{
    background:var(--navy-soft);
    opacity:1;
}

.leftdata a,
.leftproducts{
    display:block;
    text-decoration:none;
    color:#4a214e;
}

.leftproducts{
    font-size:13px;
    margin:0;
}

.leftimg{
    width:22px;
    max-width:22px;
    height:auto;
    margin-bottom:2px;
}

.lefttitle{
    display:block;
    width:100%;
    text-align:center;
    line-height:1.15;
}

#active{
    background:var(--navy);
    color:#fff;
    border-bottom-color:var(--navy);
}

#active .leftproducts,
#active .lefttitle,
.active{
    color:#fff !important;
}

/* ===== PAGE SECTIONS ===== */
.searchdiv{
    width:calc(100% - 24px);
    height:auto;
    margin:12px;
    padding:10px 12px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    overflow:hidden;
}

.showdiv{
    width:calc(100% - 24px);
    height:auto;
    margin:12px;
    padding:14px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    overflow-x:auto;
}

.adddiv{
    width:100%;
    height:auto;
    border-bottom:1px solid var(--border);
    display:none;
    padding-bottom:10px;
}

.datadiv{
    width:100%;
    height:auto;
    margin-top:8px;
    overflow-x:auto;
}

.datatitle{
    color:var(--navy-dark);
    font-size:18px;
    font-weight:700;
    margin:0;
}

/* ===== BUTTONS ===== */
button,
input[type="submit"],
input[type="button"]{
    transition:.16s ease;
}

.addbtn,.excelbtn,.searchbtn,.backbtn,.printbtn,
.stockbtn,.stockkyatbtn,.editbtn,.deletebtn,.cancelbtn,
.profitshowbtn,.invoiceprofit{
    border:none;
    border-radius:8px;
    cursor:pointer;
    min-height:38px;
    padding:7px 12px;
    font-family:'Times New Roman';
}

.addbtn,.searchbtn,.backbtn,.printbtn,.editbtn,.profitshowbtn{
    background:var(--navy);
    color:#fff;
}

.excelbtn,.stockbtn{
    background:var(--success);
    color:#fff;
}

.stockkyatbtn{
    background:#2563eb;
    color:#fff;
}

.deletebtn{
    background:var(--danger);
    color:#fff;
}

.cancelbtn,.invoiceprofit{
    background:#f59e0b;
    color:#111;
}

.addbtn,.excelbtn{
    width:auto;
    min-width:92px;
    float:right;
    margin-left:8px;
    font-size:15px;
}

.searchbtn{
    min-width:120px;
    font-size:15px;
}

.backbtn{
    float:left;
    min-width:115px;
    font-size:15px;
}

.printbtn{
    float:right;
    min-width:115px;
    margin-right:0;
    font-size:15px;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover{
    opacity:.88;
    transform:translateY(-1px);
}

/* ===== INPUTS ===== */
input,select,textarea{
    font-family:Pyidaungsu, Arial, sans-serif;
}

.searchinput,.searchdate,
.username,.password{
    border:1px solid #cbd5e1;
    border-radius:8px;
    background:#fff;
    min-height:40px;
    padding:7px 10px;
    font-size:15px;
    box-shadow:none;
    outline:none;
}

.searchinput:focus,.searchdate:focus,
.username:focus,.password:focus,
input:focus,select:focus,textarea:focus{
    border-color:#4f8fca;
    box-shadow:0 0 0 3px rgba(11,79,138,.12);
    outline:none;
}

.searchinput{
    width:280px;
    max-width:60%;
    margin:0 0 8px 5px;
}

.searchdate{
    width:180px;
    max-width:40%;
    margin:0 0 8px 5px;
}

/* ===== DATA TABLES ===== */
#resultTable{
    width:100%;
    min-width:720px;
    cursor:pointer;
    border-collapse:collapse;
    border:1px solid var(--border);
    background:#fff;
    font-size:14px;
    text-align:center;
}

#resultTable th{
    background:var(--navy) !important;
    color:#fff !important;
    font-weight:700;
}

#resultTable th,#resultTable td{
    border:1px solid var(--border);
    padding:8px 7px;
    vertical-align:middle;
}

#resultTable tr:nth-child(even) td{
    background:#fafcff;
}

#resultTable tr:hover td{
    background:var(--navy-soft);
    color:var(--text);
}

.record{
    min-height:42px;
}

/* ===== SALES PAGE ===== */
.saledatadiv{
    width:31%;
    height:auto;
    float:left;
    border-right:1px solid var(--border);
    padding:12px 20px 12px 8px;
}

.salediv{
    width:67%;
    float:right;
    margin:0;
    padding:12px 4px 12px 16px;
    overflow-x:auto;
}

.saledatadiv table{
    width:100% !important;
}

.saledatadiv input[type="text"],
.saledatadiv input[type="number"],
.saledatadiv select{
    width:100% !important;
    max-width:100%;
    min-height:42px !important;
    border:1px solid #cbd5e1 !important;
    border-radius:8px !important;
    padding:7px 9px !important;
    background:#fff !important;
    font-size:15px !important;
}

.saledatadiv td{
    padding:6px 4px;
}

.delitbl{
    width:100%;
    margin:10px 0 0 0;
    font-family:'Times New Roman';
}

.a5btn,.slipbtn,.saledatabtn{
    min-height:44px !important;
    border-radius:8px !important;
    font-size:16px !important;
    font-weight:700 !important;
}

.saleinvoice{
    background:#fff;
    color:#0080C0;
    font-size:64px;
    border:none;
    cursor:pointer;
}

/* ===== PREVIEW ===== */
.preview{
    width:min(760px,96%);
    margin:18px auto;
    min-height:auto;
    overflow:auto;
    background:#fff;
    box-shadow:var(--shadow);
    border:1px solid var(--border);
    border-radius:10px;
    padding:10px;
}

#content{
    width:100%;
    max-width:148.5mm;
    height:auto;
    margin:16px auto 0 auto;
}

/* ===== LOGIN ===== */
.logindiv{
    width:min(500px,92%);
    min-height:280px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:12px;
    box-shadow:var(--shadow);
    margin:11vh auto 0 auto;
    padding:24px;
}

.username,.password{
    width:100%;
    min-height:46px;
}

.logintbl{ width:100%; }
.logintbl td{ padding-top:10px; }

/* ===== GENERAL ===== */
.allinonediv{
    width:31%;
    min-height:520px;
    float:left;
    margin:1%;
    padding:16px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:10px;
    box-shadow:var(--shadow);
}

/* ===== DASHBOARD ===== */
.searchdash{
    width:calc(100% - 24px);
    min-height:90px;
    height:auto;
    margin:12px;
    padding:12px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:10px;
    box-shadow:var(--shadow);
}

.dashdiv{
    width:22%;
    min-width:180px;
    min-height:80px;
    float:left;
    margin:1.5%;
    padding:12px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:10px;
    box-shadow:var(--shadow);
    color:var(--navy);
    cursor:pointer;
    font-weight:700;
}

.dashsalediv{
    width:100%;
    min-height:50px;
    border-radius:8px;
}

#chart-container{
    width:62%;
    height:auto;
    float:left;
    margin:20px 0 0 2%;
    background:#fff;
    border:1px solid var(--border);
    border-radius:10px;
    box-shadow:var(--shadow);
    padding:12px;
    overflow:auto;
}

.dashright{
    width:32%;
    height:auto;
    margin:20px 2% 0 0;
    float:right;
    background:#fff;
    border:1px solid var(--border);
    border-radius:10px;
    box-shadow:var(--shadow);
    padding:12px;
    color:var(--navy);
    cursor:pointer;
    font-weight:700;
}

/* ===== RADIO ===== */
.container{
    display:block;
    position:relative;
    padding-left:34px;
    margin-bottom:10px;
    cursor:pointer;
    font-size:19px;
    user-select:none;
}

.container input{
    position:absolute;
    opacity:0;
    cursor:pointer;
}

.checkmark{
    position:absolute;
    top:0;
    left:0;
    height:24px;
    width:24px;
    background:#e5e7eb;
    border-radius:50%;
}

.container:hover input ~ .checkmark{
    background:#d1d5db;
}

.container input:checked ~ .checkmark{
    background:#2196F3;
}

.checkmark:after{
    content:"";
    position:absolute;
    display:none;
}

.container input:checked ~ .checkmark:after{
    display:block;
}

.container .checkmark:after{
    top:8px;
    left:8px;
    width:8px;
    height:8px;
    border-radius:50%;
    background:#fff;
}

/* ===== TABLET ===== */
@media screen and (max-width:1000px){
    .topbar{
        min-height:50px;
        position:relative;
    }

    .develop{
        font-size:16px;
    }

    #timediv,.logout,.welcome{
        font-size:13px;
    }

    .leftmenu{
        width:88px;
        top:0;
        min-height:calc(100vh - 50px);
    }

    .rightmenu{
        width:calc(100% - 88px);
    }

    .leftproducts{ font-size:11px; }
    .leftimg{ width:19px; }

    .saledatadiv{
        width:100%;
        float:none;
        border-right:none;
        border-bottom:1px solid var(--border);
        padding:10px;
    }

    .salediv{
        width:100%;
        float:none;
        padding:14px 0 0 0;
    }

    .allinonediv{
        width:48%;
        margin:1%;
        min-height:400px;
    }

    #chart-container,.dashright{
        width:96%;
        float:none;
        margin:14px 2%;
    }

    .dashdiv{
        width:46%;
        margin:2%;
    }

    .preview{
        width:96%;
        margin:10px auto;
    }
}

/* ===== PHONE ===== */
@media screen and (max-width:650px){
    body{
        background:#fff;
    }

    .topbar{
        display:block;
        padding:8px;
    }

    .developdiv,.subtopbarright{
        width:100%;
        display:block;
        text-align:center;
    }

    .develop{
        text-align:center;
        font-size:15px;
    }

    #timediv,.logout,.welcome{
        display:inline-block;
        font-size:12px;
        margin:2px 3px;
    }

    .leftmenu{
        float:none;
        width:100%;
        min-height:auto;
        position:relative;
        display:flex;
        flex-wrap:wrap;
        justify-content:center;
        border-right:none;
        border-bottom:1px solid var(--border);
        padding:5px;
        background:#fff;
    }

    .leftdata{
        width:24%;
        min-width:72px;
        margin:2px;
        padding:5px 2px;
        border:1px solid #eee;
    }

    .leftproducts{
        font-size:10px;
    }

    .leftimg{
        width:17px;
    }

    .rightmenu{
        float:none;
        width:100%;
        min-height:auto;
        background:#f8fafc;
        overflow-x:auto;
    }

    .searchdiv,.showdiv,.datadiv,.searchdash{
        width:calc(100% - 12px);
        margin:6px;
        padding:10px;
        border-radius:8px;
    }

    .searchinput,.searchdate{
        width:100%;
        max-width:none;
        margin:4px 0;
        min-height:44px;
    }

    .addbtn,.excelbtn,.searchbtn{
        width:100%;
        float:none;
        margin:4px 0;
        min-height:44px;
    }

    #resultTable{
        min-width:650px;
        font-size:12px;
    }

    #resultTable th,#resultTable td{
        padding:5px;
    }

    .saledatadiv,.salediv{
        width:100%;
        float:none;
        margin:0;
    }

    .saledatadiv{
        padding:8px 2px 12px;
    }

    .salediv{
        padding:10px 0 0;
    }

    .allinonediv{
        width:100%;
        float:none;
        margin:8px 0;
        min-height:auto;
    }

    .dashdiv{
        width:100%;
        min-width:0;
        float:none;
        margin:8px 0;
    }

    #chart-container,.dashright{
        width:100%;
        float:none;
        margin:10px 0;
    }

    .preview{
        width:100%;
        margin:0 auto;
        padding:4px;
        border:none;
        box-shadow:none;
    }

    #content{
        max-width:100%;
        margin-top:8px;
    }

    .backbtn,.printbtn{
        float:none;
        width:48%;
        min-width:0;
        margin:4px 1%;
    }

    .logindiv{
        width:94%;
        margin:8vh auto 0 auto;
        padding:16px;
    }

    .container{
        font-size:17px;
    }
}
