/* ==================================================
   THEME VARIABLES – MODERN SAAS (LIGHT)
================================================== */
:root {
    --bg-main: #f4f7fb;
    --bg-card: #ffffff;
    --bg-sidebar: #616161;

    --primary: #4f46e5;
    --primary-soft: #eef2ff;
    --secondary: #06b6d4;

    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #e5e7eb;

    --border: #e2e8f0;

    --radius: 14px;
    --shadow-sm: 0 4px 12px rgba(0,0,0,.06);
    --shadow-md: 0 10px 24px rgba(0,0,0,.08);
}

/* ==================================================
   RESET & BASE
================================================== */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: "Inter","Segoe UI",system-ui,sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
}

/* ==================================================
   LOGIN PAGE
================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, #eef2ff, transparent 60%),
        radial-gradient(circle at bottom right, #cffafe, transparent 55%),
        var(--bg-main);
}

.login-card {
    width: 380px;
    background: var(--bg-card);
    padding: 36px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.login-card h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
}

.login-card p {
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 14px;
}

.login-card input {
    width: 100%;
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 15px;
}

.login-card input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}

.login-card button {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg,var(--primary),var(--secondary));
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
}

/* ==================================================
   APP LAYOUT
================================================== */
.app {
    display: flex;
    min-height: 100vh;
}

/* ==================================================
   SIDEBAR
================================================== */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg,#181018,#0f192a);
    padding: 24px 18px;
    color: var(--text-light);
}

.sidebar .logo {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 28px;
}

.sidebar a {
    display: block;
    padding: 12px 14px;
    margin-bottom: 6px;
    border-radius: 12px;
    color: #cbd5f5;
    font-size: 15px;
}

.sidebar a.active,
.sidebar a:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.sidebar .logout {
    margin-top: 28px;
    background: rgba(220,38,38,.15);
    color: #fecaca;
}

/* ==================================================
   MAIN CONTENT
================================================== */
.main {
    flex: 1;
    padding: 26px;
}

/* ==================================================
   TOP BAR
================================================== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.topbar h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

/* ==================================================
   SEARCH BAR
================================================== */
.search-bar {
    display: flex;
    align-items: left;
  gap: 8px;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 8px 14px;
  width: 260px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);

}

.search-bar input {

  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  color: #333;
  }
  
  .search-bar:focus-within {
  border-color: #007BFF;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.btn-small {
    padding: 0 10px;
    border-radius: 12px;
    border: none;
        font-size: 18px;
    cursor: pointer;
}

.btn-small img {
    width: 40px;
        object-fit: contain;
}


/* ==================================================
   INFO BOX
================================================== */
.search-result-box {
    padding: 14px;
    background: var(--primary-soft);
    border-radius: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ==================================================
   CARDS / PANELS
================================================== */
.card,
.panel {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.panel h3,
.card h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
}

/* ==================================================
   TABLES
================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    text-transform: uppercase;
    font-size: 12px;
    color: var(--text-muted);
    padding: 12px;
    border-bottom: 2px solid var(--border);
    text-align: left;
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

tr:hover {
    background: #f8fafc;
}

/* ==================================================
   STATUS ROWS
================================================== */
.green {
    background: #ecfdf5;
    color: #166534;
}

.yellow {
    background: #fffbeb;
    color: #92400e;
}

.red {
    background: #fee2e2;
    color: #7f1d1d;
}

/* ==================================================
   BADGES
================================================== */
.badge,
.status-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #7f1d1d;
}

/* ==================================================
   SCANNER OVERLAY
================================================== */
.scanner {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
}

#camera {
    width: 90%;
    max-width: 420px;
    height: 300px;
    background: #000;
    border-radius: 16px;
    margin-bottom: 20px;
}

/* ==================================================
   UTILITIES
================================================== */
.hidden { display: none; }
.center { text-align: center; }
.right  { text-align: right; }
.strong { font-weight: 600; }

.muted {
    color: var(--text-muted);
    text-align: center;
}

/* ==================================================
   MOBILE / PWA SAFE
================================================== */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .main { padding: 18px; }
    input, button { font-size: 16px; }
}

.primary-btn {
    background: linear-gradient(135deg,#4f46e5,#06b6d4);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.upload-form {
    display: flex;
    gap: 12px;
    margin: 12px 0;
}

.upload-form input[type="file"] {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f8fafc;
}

table td a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

table td a:hover {
    text-decoration: underline;
}


.blue-header {
  background-color: #007BFF;
  color: #ffffff;
  padding: 5px 20px 5px 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
    margin-bottom: 15px;
    
  border-radius: 6px;
   transition: all 0.3s ease;
    
}

.blue-header .header-title {
  font-size: 24px;
  font-weight: 600;
}

.blue-header .header-btn {
  background-color: #ffffff;
  color: #007BFF;
  border: none;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.blue-header .header-btn:hover {
  background-color: #0056b3;
  color: #ffffff;
}

@media (max-width: 600px) {
  .blue-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

.right-box {
  display: flex;
  justify-content: flex-end; /* move content to right */
  align-items: center;
  gap: 12px; /* space between text & button */
}

.data-table {
  width: 100%;
  border-collapse: separate; /* IMPORTANT */
  border-spacing: 0;
  
}

.data-table thead th {
   background-color: #007BFF;
  color: #fff;
  padding: 14px;
  letter-spacing: 0.3px;
  position: sticky;
  top: 0;
  z-index: 2;
  
}

.data-table th,
.data-table td {
  border: 1px solid #ddd;
  padding: 10px;
}
.table-wrapper {
  width: 100%;
}

.data-table tbody tr {
  background-color: #f9f9f9;
}

.data-table tbody tr:nth-child(even) {
  background-color: #ffffff;
}
.data-table thead th:first-child {
  border-top-left-radius: 12px;
}
.data-table thead th:last-child {
  border-top-right-radius: 12px;
}
/* ===============================
ZOHO TABLE STYLE
=============================== */

.table-container{
background:white;
border-radius:12px;
overflow:auto;
box-shadow:0 4px 12px rgba(0,0,0,0.05);
position:relative;
}

.zoho-table{
width:100%;
border-collapse:collapse;
}

.zoho-table th,
.zoho-table td{
padding:14px;
border-bottom:1px solid #eee;
}

.zoho-table th{
background:#fafafa;
font-weight:600;
position:relative;
}

.table-actions{
position:absolute;
top:0px;
right:15px;
z-index:5;
}

.primary-btn{
background:#f97316;
border:none;
color:white;
padding:8px 14px;
border-radius:8px;
cursor:pointer;
}

/* column resize */
.resize-handle{
position:absolute;
right:0;
top:0;
width:6px;
height:100%;
cursor:col-resize;
}

/* column popup */
.column-popup{
position:absolute;
right:20px;
top:50px;
background:white;
border-radius:10px;
box-shadow:0 5px 20px rgba(0,0,0,0.1);
padding:15px;
display:none;
z-index:10;
}

.column-popup label{
display:block;
margin:6px 0;
}


