/* LON.database - Life OS dark navy / gold theme, RTL, touch friendly */
.lon-db{direction:rtl;font-family:"Cairo","Tajawal",system-ui,-apple-system,"Segoe UI",sans-serif;background:#0B1220;color:#FBF3E1;display:flex;flex-direction:column;height:100%;font-size:15px}
.lon-db *{box-sizing:border-box}
.lon-db-tabs{display:flex;gap:4px;padding:8px 12px;border-bottom:1px solid rgba(198,161,91,.25);overflow-x:auto;-webkit-overflow-scrolling:touch}
.lon-db-tab{background:transparent;border:1px solid rgba(198,161,91,.35);color:#FBF3E1;border-radius:8px;padding:8px 14px;min-height:44px;font-size:14px;cursor:pointer;white-space:nowrap}
.lon-db-tab.active{background:#C6A15B;color:#0B1220;font-weight:700;border-color:#C6A15B}
.lon-db-tab.add{color:#C6A15B}
.lon-db-body{flex:1;overflow:auto;padding:8px 12px}
.lon-db-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px;align-items:center}
.lon-db-search{flex:1;min-width:140px;background:#101a30;border:1px solid rgba(198,161,91,.35);color:#FBF3E1;border-radius:8px;padding:10px 12px;min-height:44px;font-size:14px}
.lon-db-btn{background:#16233f;border:1px solid rgba(198,161,91,.35);color:#FBF3E1;border-radius:8px;padding:10px 14px;min-height:44px;font-size:14px;cursor:pointer}
.lon-db-btn.primary{background:#C6A15B;color:#0B1220;font-weight:700;border-color:#C6A15B}
.lon-db-btn:active,.lon-db-tab:active{opacity:.8}
.lon-db-mini{background:transparent;border:none;color:#FBF3E1;font-size:16px;min-width:36px;min-height:36px;cursor:pointer;border-radius:6px}
.lon-db-menu{background:#16233f;border:1px solid #C6A15B;border-radius:10px;min-width:180px;box-shadow:0 8px 24px rgba(0,0,0,.5);overflow:hidden}
.lon-db-menu-item{display:block;width:100%;text-align:right;background:transparent;border:none;color:#FBF3E1;padding:12px 16px;min-height:44px;font-size:14px;cursor:pointer;border-bottom:1px solid rgba(198,161,91,.15)}
.lon-db-menu-item:last-child{border-bottom:none}
.lon-db-menu-item:active,.lon-db-menu-item:hover{background:rgba(198,161,91,.15)}
.lon-db-tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid rgba(198,161,91,.25);border-radius:10px}
.lon-db-table{border-collapse:collapse;width:100%;min-width:480px}
.lon-db-table th{background:#16233f;color:#C6A15B;padding:12px;min-height:44px;text-align:right;font-size:13px;border-bottom:1px solid rgba(198,161,91,.25);cursor:pointer;white-space:nowrap}
.lon-db-table td{padding:12px;border-bottom:1px solid rgba(198,161,91,.12);min-height:44px;vertical-align:middle}
.lon-db-table tr:active{background:rgba(198,161,91,.06)}
.lon-db-title{font-weight:700;cursor:pointer;color:#FBF3E1}
.lon-db-delcol{width:44px;text-align:center}
.lon-db-empty{color:rgba(251,243,225,.35)}
.lon-db-grouphdr td{background:rgba(110,30,43,.35);color:#C6A15B;font-weight:700}
.lon-db-chip{display:inline-block;background:#6E1E2B;color:#FBF3E1;border-radius:12px;padding:3px 10px;font-size:12px;margin:2px}
.lon-db-check{background:#16233f;border:1px solid rgba(198,161,91,.5);color:#C6A15B;border-radius:6px;min-width:36px;min-height:36px;font-size:16px;cursor:pointer}
.lon-db-check.on{background:#C6A15B;color:#0B1220}
.lon-db-board{display:flex;gap:12px;overflow-x:auto;-webkit-overflow-scrolling:touch;align-items:flex-start;padding-bottom:8px}
.lon-db-col{flex:0 0 260px;background:#101a30;border:1px solid rgba(198,161,91,.25);border-radius:12px;display:flex;flex-direction:column;max-height:70vh}
.lon-db-colhdr{display:flex;align-items:center;gap:8px;padding:10px 12px;font-weight:700;color:#C6A15B;border-bottom:1px solid rgba(198,161,91,.2)}
.lon-db-count{margin-inline-start:auto;background:rgba(198,161,91,.2);border-radius:10px;padding:1px 8px;font-size:12px}
.lon-db-grow{flex:1}
.lon-db-collist{flex:1;overflow-y:auto;padding:8px;display:flex;flex-direction:column;gap:8px;min-height:60px}
.lon-db-collist.over{outline:2px dashed #C6A15B;border-radius:8px}
.lon-db-card-item{background:#16233f;border:1px solid rgba(198,161,91,.3);border-radius:10px;padding:10px 12px;cursor:grab}
.lon-db-card-title{font-weight:700}
.lon-db-card-sub{font-size:12px;color:rgba(251,243,225,.7);margin-top:2px}
.lon-db-addcard{background:transparent;border:none;color:#C6A15B;padding:12px;min-height:44px;font-size:14px;cursor:pointer;text-align:right}
.lon-db-list{display:flex;flex-direction:column;gap:6px}
.lon-db-listitem{display:flex;align-items:center;gap:8px;background:#101a30;border:1px solid rgba(198,161,91,.25);border-radius:10px;padding:12px;min-height:52px;cursor:pointer}
.lon-db-listhdr{color:#C6A15B;font-weight:700;padding:8px 4px 2px}
.lon-db-note{color:rgba(251,243,225,.7);padding:16px}
.lon-db-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;z-index:9999;padding:16px}
.lon-db-overlay .lon-db-card{background:#16233f;border:1px solid #C6A15B;border-radius:14px;padding:16px;width:100%;max-width:420px;max-height:80vh;overflow-y:auto;display:flex;flex-direction:column;gap:10px}
.lon-db-overlay h3{color:#C6A15B;margin:0 0 4px}
.lon-db-optlist{display:flex;flex-direction:column;gap:6px}
.lon-db-optrow{display:flex;align-items:center;gap:8px}
.lon-db-optrow input,.lon-db-optrow select{flex:1;background:#101a30;border:1px solid rgba(198,161,91,.35);color:#FBF3E1;border-radius:8px;padding:10px;min-height:44px;font-size:14px}
.lon-db-swatch{width:22px;height:22px;border-radius:6px;flex:none;border:1px solid rgba(251,243,225,.4);cursor:pointer}
