/* Theme Variables */
:root {
    --bg-main: #f4f6f9;
    --bg-panel: #ffffff;
    --text-main: #333333;
    --text-muted: #555555;
    --border-color: #e0e0e0;
    --input-bg: #ffffff;
    --table-th-bg: #f8f9fc;
    --table-td-text: #0000ff;
    --details-bg: #f1f3f9;
    --details-text: #333333;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    --highlight-box-bg: #fff3cd;
    --highlight-border: #ffeeba;
    --highlight-text: #856404;
    --popup-box-bg: #e3f2fd;
    --popup-border: #90caf9;
    --popup-text: #0d47a1;
    --login-box-bg: #ede7f6;
    --login-border: #b39ddb;
    --login-text: #4527a0;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body { background-color: var(--bg-main); color: var(--text-main); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 100vh; padding: 20px; transition: background-color 0.3s, color 0.3s; scroll-behavior: smooth;}

/* Top Search Section Styling */
.top-global-search-container {
    width: 100%;
    max-width: 1050px;
    background: var(--bg-panel);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    border: 2px solid #007bff;
    margin-bottom: 20px;
    position: relative;
}
.top-search-title {
    font-size: 16px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.top-search-box {
    display: flex;
    gap: 10px;
}
.top-search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    background: var(--input-bg);
    color: var(--text-main);
}
.top-search-box input:focus {
    border-color: #007bff;
    outline: none;
}
.top-search-box button {
    padding: 0 25px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
}
.top-search-box button:hover {
    background-color: #0056b3;
}
.top-search-results {
    display: none;
    margin-top: 10px;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-panel);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.top-search-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}
.top-search-item:last-child {
    border-bottom: none;
}
.top-search-item:hover {
    background-color: var(--table-th-bg);
}

/* Global Dashboard Extra Styles */
.dashboard-container { width: 100%; max-width: 1050px; display: flex; gap: 15px; justify-content: space-between; margin-bottom: 15px; }
.dash-card { background-color: var(--bg-panel); border: 1px solid var(--border-color); border-radius: 10px; padding: 15px; text-align: center; flex: 1; box-shadow: var(--box-shadow); }
.dash-title { font-size: 13px; color: var(--text-muted); margin-bottom: 5px; font-weight: bold; }
.dash-value { font-size: 24px; color: #007bff; font-weight: bold; font-family: 'Courier New', Courier, monospace; }

.admin-box, .list-box-new { background-color: var(--bg-panel); padding: 25px; border-radius: 10px; border: 1px solid var(--border-color); width: 100%; max-width: 1050px; box-shadow: var(--box-shadow); margin-bottom: 15px; }
.search-area { display: flex; gap: 10px; margin-bottom: 5px; }
.btn-search { padding: 0 20px; background-color: #007bff; border: none; color: #ffffff; font-weight: bold; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.btn-search:hover { background-color: #0056b3; }
.btn-submit { width: 100%; padding: 12px; background-color: #28a745; border: none; border-radius: 6px; color: #ffffff; font-weight: bold; font-size: 15px; cursor: pointer; margin-top: 5px; }
.btn-submit:hover { background-color: #218838; }
.status-msg { text-align: center; font-size: 14px; margin-top: 5px; color: #28a745; font-weight: bold; min-height: 20px; }
.page-table { width: 100%; border-collapse: collapse; margin-top: 5px; }
.page-table th, .page-table td { padding: 10px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 13px; vertical-align: middle; }
.page-table th { color: var(--text-main); font-weight: 600; background-color: var(--table-th-bg); }
.page-table tr:hover { background-color: var(--table-th-bg); }
.action-btns { display: flex; flex-direction: column; gap: 4px; width: max-content; }
.btn-edit-new { background-color: #28a745; border: none; color: white; padding: 5px 10px; border-radius: 5px; cursor: pointer; font-weight: bold; transition: 0.2s; font-size: 12px; text-align: center; }
.btn-edit-new:hover { background-color: #218838; }
.btn-delete-new { background-color: #dc3545; border: none; color: white; padding: 5px 10px; border-radius: 5px; cursor: pointer; font-weight: bold; transition: 0.2s; font-size: 12px; text-align: center; }
.btn-delete-new:hover { background-color: #c82333; }
.truncate { max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.highlight-input { border: 2px solid #007bff !important; background-color: #e3f2fd !important; color: #000000 !important; font-weight: bold; font-size: 16px; }

/* Shutter/Accordion System Design */
.shutter-header { background: var(--bg-panel); padding: 15px 25px; border-radius: 12px; box-shadow: var(--box-shadow); width: 100%; max-width: 1050px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; margin-top: 15px; transition: background-color 0.3s, transform 0.2s; border: 1px solid var(--border-color); }
.shutter-header:hover { background-color: var(--table-th-bg); }
.shutter-header h3 { margin-bottom: 0; font-size: 18px; width: 100%; display: flex; justify-content: space-between; align-items: center; font-weight: bold; color: var(--text-main); }
.shutter-icon { font-size: 16px; transition: transform 0.4s ease; margin-left: 10px; color: var(--text-muted); }
.shutter-header.active .shutter-icon { transform: rotate(180deg); color: #4e73df; }

.shutter-content { width: 100%; max-width: 1050px; max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.5s ease-out, opacity 0.4s ease, padding 0.3s ease; display: flex; flex-direction: column; align-items: center; }
.shutter-content.show { max-height: 50000px; opacity: 1; overflow: visible; padding-bottom: 20px; padding-top: 5px; }

/* Panel and Box Inside Styles */
.container { background: var(--bg-panel); padding: 30px; border-radius: 12px; box-shadow: var(--box-shadow); width: 100%; max-width: 500px; transition: background-color 0.3s; margin-bottom: 0; }

h2, h3.title-new { text-align: center; margin-bottom: 25px; font-size: 24px; color: var(--text-main); }
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; color: var(--text-muted); font-weight: 600; font-size: 13px; }

input[type="text"], input[type="url"], input[type="number"], textarea, select { 
    width: 100%; padding: 12px; border: 2px solid var(--border-color); 
    border-radius: 8px; font-size: 15px; background-color: var(--input-bg); 
    color: var(--text-main); transition: background-color 0.3s, border-color 0.3s, color 0.3s; 
}

textarea { resize: vertical; font-family: monospace; }
button.btn-core { width: 100%; padding: 14px; background-color: #4e73df; color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; transition: background-color 0.3s; }
button.btn-core:hover { filter: brightness(90%); }

.highlight-container { background: var(--highlight-box-bg); border: 2px dashed var(--highlight-border); color: var(--highlight-text); padding: 20px; border-radius: 12px; width: 100%; max-width: 500px; box-shadow: var(--box-shadow); }
.highlight-container h4 { margin-bottom: 12px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.btn-highlight { background-color: #f6c23e; color: #333; margin-top: 10px; width: 100%; padding: 14px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }
.btn-highlight-clear { background-color: #e74a3b; color: white; margin-top: 8px; width: 100%; padding: 14px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }

.popup-container { background: var(--popup-box-bg); border: 2px solid var(--popup-border); color: var(--popup-text); padding: 20px; border-radius: 12px; width: 100%; max-width: 500px; box-shadow: var(--box-shadow); }
.popup-container h4 { margin-bottom: 12px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.btn-popup { background-color: #1cc88a; color: white; margin-top: 10px; width: 100%; padding: 14px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }

.login-popup-container { background: var(--login-box-bg); border: 2px solid var(--login-border); color: var(--login-text); padding: 20px; border-radius: 12px; width: 100%; max-width: 500px; box-shadow: var(--box-shadow); }
.login-popup-container h4 { margin-bottom: 12px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.btn-login-popup { background-color: #6750a4; color: white; margin-top: 10px; width: 100%; padding: 14px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }

.security-container { background: #fff3e0; border: 2px solid #ffb74d; color: #e65100; padding: 20px; border-radius: 12px; width: 100%; max-width: 500px; box-shadow: var(--box-shadow); }
.security-container h4 { margin-bottom: 12px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.btn-security { background-color: #f57c00; color: white; margin-top: 10px; width: 100%; padding: 14px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }

.status { text-align: center; margin-top: 15px; font-weight: 600; display: none; padding: 10px; border-radius: 6px; }
.success { background-color: #e8f5e9; color: #2e7d32; }
.error { background-color: #ffebee; color: #c62828; }
.info { background-color: #e3f2fd; color: #1565c0; }

.list-container { background: var(--bg-panel); padding: 25px 5px; border-radius: 12px; box-shadow: var(--box-shadow); width: 100%; max-width: 1050px; overflow-x: hidden; touch-action: pan-y; transition: background-color 0.3s; border: 1px solid var(--border-color); box-sizing: border-box; }
.captured-list-container { background: var(--bg-panel); padding: 25px 5px; border-radius: 12px; box-shadow: var(--box-shadow); width: 100%; max-width: 1050px; overflow-x: hidden; touch-action: pan-y; transition: background-color 0.3s; box-sizing: border-box; }

.user-count { background-color: #4e73df; color: white; padding: 4px 10px; border-radius: 5px; font-size: 14px; margin-left: 10px; }

table.core-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; table-layout: fixed; }
table.core-table th, table.core-table td { border: 1px solid var(--border-color); padding: 10px 5px; text-align: left; word-wrap: break-word; white-space: normal; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }

table.core-table th { background-color: var(--table-th-bg); color: #ff0000; font-weight: bold; transition: background-color 0.3s; }
table.core-table td { color: var(--table-td-text); transition: color 0.3s; }

.btn-action { padding: 6px 12px; font-size: 12px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; color: white; margin-right: 5px; display: inline-block; width: auto; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: all 0.2s; }
.btn-action:hover { filter: brightness(85%); }
.btn-edit { background-color: #f6c23e; }
.btn-delete { background-color: #e74a3b; }
.btn-cancel { background-color: #858796; margin-top: 10px; width: 100%; padding: 14px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; color: white; }
.btn-block-user { background-color: #e74a3b; }
.btn-unblock { background-color: #2e7d32; }
.btn-user-delete { background-color: #cc0000; }
.btn-save-single { background-color: #1cc88a; width: 100%; padding: 6px; font-size: 12px; margin-top: 5px; border-radius: 4px; border: none; color: white; font-weight: bold; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: all 0.2s; }
.btn-save-single:hover { filter: brightness(85%); }

.form-action-group { margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--border-color); display: flex; gap: 10px; }
.form-action-group button { padding: 10px; font-size: 14px; margin-right: 0; }

.order-input { width: 70px; padding: 8px; text-align: center; border: 2px solid var(--border-color); border-radius: 4px; font-weight: bold; font-size: 15px; color: var(--text-main); background-color: var(--input-bg); }
.details-box { font-size: 12px; background: var(--details-bg); padding: 6px; border-radius: 4px; color: var(--details-text) !important; max-height: 100px; overflow-y: auto; transition: background-color 0.3s, color 0.3s; }

.secure-data-text { color: #d32f2f !important; font-weight: bold; font-family: monospace; font-size: 15px; }

.search-container { display: flex; gap: 8px; margin-bottom: 15px; border-bottom: 1px dashed var(--border-color); padding-bottom: 15px; }
.search-container input { flex: 1; }
.search-container button { width: auto; padding: 0 20px; background-color: #2c3e50; color: white; border: none; border-radius: 8px; font-weight: bold;}

.serial-info-box { background-color: #e3f2fd; border-left: 4px solid #1cc88a; padding: 12px 15px; margin-bottom: 15px; margin-top: 0px; border-radius: 4px; font-size: 14px; font-weight: 600; color: #0d47a1; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; width: 100%; max-width: 1050px; box-sizing: border-box; box-shadow: var(--box-shadow); }
