/* ========================================
   BUNKER SOFT - HOME STYLES
   ======================================== */

/* Theme Variables */
:root {
    --bg-gradient-start: #0077b6;
    --bg-gradient-end: #023e8a;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-solid: #fff;
    --bg-input: #fff;
    --bg-section: #f8f9fa;
    --border-color: #ddd;
    --border-color-light: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --accent-color: #0077b6;
    --accent-light: rgba(0, 119, 182, 0.1);
    --accent-gradient: linear-gradient(135deg, #0077b6 0%, #005f8a 100%);
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

[data-theme="dark"] {
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    --text-primary: #e0e0e0;
    --text-secondary: #aaa;
    --text-muted: #777;
    --bg-card: rgba(30, 30, 50, 0.95);
    --bg-card-solid: #1e1e32;
    --bg-input: #2a2a45;
    --bg-section: #252540;
    --border-color: #444;
    --border-color-light: #3a3a55;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --accent-color: #00b4d8;
    --accent-light: rgba(0, 180, 216, 0.15);
    --accent-gradient: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

/* ========================================
   BASE STYLES
   ======================================== */
body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: "Roboto Condensed";
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    transition: background 0.3s;
}

@font-face {
    font-family: 'Roboto Condensed';
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/roboto.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ========================================
   LEFT MENU
   ======================================== */
.left-menu {
    position: fixed;
    left: 0;
    top: 0;
    width: 150px;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.menu-logo {
    width: 90px;
    height: auto;
    display: block;
    margin: 0 auto 30px auto;
}

.menu-items {
    flex: 1;
}

.user-section {
    border-top: 1px solid #ddd;
    padding: 15px 10px 40px 10px;
    text-align: center;
}

.user-greeting {
    font-size: 14px;
    font-weight: bold;
    color: #0077b6;
    margin-bottom: 3px;
}

.user-role {
    font-size: 11px;
    color: #555;
    font-style: italic;
    margin-bottom: 8px;
}

.last-login {
    font-size: 11px;
    color: #777;
    margin-bottom: 10px;
}

.logout-btn {
    width: 90%;
    padding: 8px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: "Roboto Condensed";
    font-size: 12px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background-color: #c82333;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: none;
    width: 100%;
    text-align: center;
    font-family: "Roboto Condensed";
    font-size: 14px;
    color: #333;
}

.menu-item:hover {
    background: rgba(0, 119, 182, 0.1);
}

.menu-item .icon {
    font-size: 28px;
    margin-bottom: 8px;
    color: #0077b6;
}

.menu-separator {
    height: 1px;
    background: #ddd;
    margin: 15px 20px;
}

.menu-item-wrapper {
    position: relative;
}

.submenu {
    position: absolute;
    left: 150px;
    top: 0;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    border-radius: 0 5px 5px 0;
    padding: 10px 0;
    display: none;
    z-index: 1001;
}

.menu-item-wrapper:hover .submenu {
    display: block;
}

.submenu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: "Roboto Condensed";
    font-size: 14px;
    color: #333;
    display: block;
}

.submenu-item:hover {
    background: rgba(0, 119, 182, 0.1);
    color: #0077b6;
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
.main-content {
    position: absolute;
    top: 0;
    left: 150px;
    right: 0;
    bottom: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app-title {
    font-size: 72px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

/* ========================================
   PAGE CONTAINER
   ======================================== */
.page-container {
    display: none;
    background: var(--bg-card, rgba(255, 255, 255, 0.95));
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 8px 24px var(--shadow-color, rgba(0, 0, 0, 0.2));
    width: 100%;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    position: relative;
}

.page-container.active {
    display: block;
}

/* ========================================
   FIND STEM PAGE
   ======================================== */
.find-stem-page {
    padding: 40px;
}

.find-stem-header {
    margin-bottom: 40px;
}

.find-stem-title {
    font-size: 28px;
    color: #0077b6;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.find-stem-title i {
    font-size: 32px;
}

.find-stem-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.find-stem-search-box {
    max-width: 500px;
}

.search-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.search-input-wrapper input {
    flex: 1;
    padding: 15px 20px;
    font-size: 18px;
    font-family: "Roboto Condensed";
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: all 0.3s;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #0077b6;
    box-shadow: 0 0 10px rgba(0, 119, 182, 0.2);
}

.search-input-wrapper input::placeholder {
    color: #aaa;
}

.search-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #0077b6, #023e8a);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Roboto Condensed";
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 119, 182, 0.4);
}

.search-btn:active {
    transform: translateY(0);
}

.search-hint {
    margin-top: 15px;
    font-size: 13px;
    color: #888;
}

.search-hint i {
    margin-right: 5px;
    color: #0077b6;
}

/* ========================================
   INLINE EDIT GRID STYLES
   ======================================== */
.inline-grid-section {
    grid-column: 1 / -1;
    margin-top: 20px;
}

.inline-grid-section h3 {
    font-size: 14px;
    font-weight: bold;
    color: #0077b6;
    margin-bottom: 12px;
}

.inline-grid {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed;
}

.inline-grid thead {
    background: linear-gradient(135deg, #0077b6 0%, #005f8a 100%);
}

.inline-grid thead th {
    padding: 10px 8px;
    text-align: left;
    font-size: 11px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.inline-grid thead th:last-child {
    border-right: none;
}

.inline-grid tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
}

.inline-grid tbody tr:last-child {
    border-bottom: none;
}

.inline-grid tbody tr:hover {
    background: rgba(0, 119, 182, 0.05);
}

.inline-grid tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.inline-grid tbody tr:nth-child(even):hover {
    background: rgba(0, 119, 182, 0.05);
}

.inline-grid td {
    padding: 0;
    border-right: 1px solid #e0e0e0;
}

.inline-grid td:last-child {
    border-right: none;
}

.inline-grid td input,
.inline-grid td select {
    width: 100%;
    padding: 10px 8px;
    border: none;
    background: transparent;
    font-family: "Roboto Condensed";
    font-size: 13px;
    text-transform: uppercase;
    box-sizing: border-box;
}

.inline-grid td input:focus,
.inline-grid td select:focus {
    outline: none;
    background: rgba(0, 119, 182, 0.08);
    box-shadow: inset 0 0 0 2px #0077b6;
}

.inline-grid td select {
    cursor: pointer;
}

.inline-grid .col-bunker {
    width: 25%;
}

.inline-grid .col-qty {
    width: 12%;
}

.inline-grid .col-um {
    width: 10%;
}

.inline-grid .col-spec {
    width: 18%;
}

.inline-grid .col-actions {
    width: 20px;
}

.inline-grid td.actions {
    text-align: center;
    padding: 0;
}

.inline-grid .clear-row-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.inline-grid .clear-row-btn:hover {
    color: #0077b6;
}