:root {
    --tally-blue-dark: #002c3d;
    --tally-blue-header: #00465c;
    --tally-blue-light: #e6eff7;
    --tally-blue-menu: #e3f2fd;
    --tally-yellow: #fcdc00;
    --tally-text: #000000;
    --tally-text-light: #555555;
    --tally-sidebar-bg: #e1f5fe;
    --tally-border: #99abb4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body,
html {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #f1f1f1;
    overflow: auto;
    /* Allow scrolling if window is smaller than 1200px */
}

/* CENTERED FIXED CONTAINER - NO WRAPPING */
.app-container {
    width: 100%;
    min-width: 1210px;
    min-height: 820px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.simulator-window {
    width: 1200px;
    height: 800px;
    background-color: var(--tally-blue-light);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid #999;
}

/* TOP NAVIGATION BAR */
.tally-top-nav {
    background-color: var(--tally-blue-dark);
    color: white;
    height: 35px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 13px;
    flex-shrink: 0;
    white-space: nowrap;
}

.tally-top-nav .nav-item {
    padding: 0 10px;
    cursor: pointer;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%;
    display: flex;
    align-items: center;
}

.tally-top-nav .nav-item span {
    text-decoration: underline;
    margin-right: 3px;
}

/* SCREEN HEADER */
.tally-screen-header {
    background-color: #799db9;
    color: #000;
    height: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    font-weight: bold;
    border-bottom: 1px solid #fff;
    flex-shrink: 0;
}

/* MAIN AREA */
.tally-main {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* SIDEBAR */
.tally-sidebar {
    width: 200px;
    background-color: #e1f5fe;
    border-right: 1px solid var(--tally-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.tally-sidebar .sidebar-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 11px;
    cursor: pointer;
    color: #00465c;
    border-bottom: 1px solid #daeef7;
}

.tally-sidebar .sidebar-btn:hover {
    background-color: #fff;
    color: #000;
}

.tally-sidebar .sidebar-btn b {
    color: #00465c;
    margin-right: 5px;
}

/* CONTENT VIEW */
.tally-view {
    flex: 1;
    background: #fff;
    overflow-y: auto;
    position: relative;
}

/* GATEWAY MENU - FULL RESTORATION */
.gateway-menu-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
}

.gateway-box {
    width: 350px;
    border: 1px solid #335d66;
    background: #eef7fa;
}

.gateway-header {
    background: #335d66;
    color: white;
    text-align: center;
    padding: 5px;
    font-size: 13px;
    font-weight: bold;
}

.gateway-section {
    padding: 5px 15px;
    font-size: 11px;
    color: #4a6572;
    font-weight: bold;
    border-bottom: 1px solid #daeef7;
    background: #e1f5fe;
}

.gateway-item {
    padding: 6px 30px;
    font-size: 14px;
    color: #000;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.gateway-item:hover {
    background: var(--tally-yellow);
    color: #000;
}

.gateway-item span {
    color: #d32f2f;
    font-weight: bold;
}

/* IN-LINE DROPDOWN */
.tally-autocomplete-dropdown {
    position: absolute;
    z-index: 5000;
    background: white;
    border: 1px solid var(--tally-blue-dark);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: none;
    max-height: 300px;
    overflow-y: auto;
    min-width: 250px;
}

.dropdown-header {
    background: var(--tally-blue-dark);
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
}

.dropdown-item {
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

.dropdown-item:hover {
    background: var(--tally-yellow);
    color: #000;
}

.dropdown-item.create-new {
    color: #d32f2f;
    font-weight: bold;
    border-top: 1px solid #eee;
}

/* BOTTOM FIXED BAR */
.tally-bottom-bar {
    height: 25px;
    background-color: #799db9;
    color: #000;
    display: flex;
    padding: 0 10px;
    font-size: 11px;
    align-items: center;
    border-top: 1px solid #fff;
    flex-shrink: 0;
}

.bottom-item {
    margin-right: 15px;
    cursor: pointer;
}

.bottom-item span {
    text-decoration: underline;
    font-weight: bold;
    margin-right: 3px;
}

/* TALLY INPUT FIELDS */
.tally-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 13px;
    padding: 5px;
    background: transparent;
}

.tally-input:focus {
    background: #fff9c4;
}

/* MODAL STYLES */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 6000;
}

.modal-box {
    background: white;
    width: 500px;
    border: 2px solid var(--tally-blue-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* F-Key Styling */
.f-key {
    background: var(--tally-blue-header);
    color: white;
    border: none;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
}