/* =========================================================
   GLOBAL.CSS
   Win95 / Win98 Internal Tools UI
   Aligned to original ISSCS Control Panel
   ========================================================= */

/* -------------------------------
   Base
   ------------------------------- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Tahoma, Arial, Helvetica, sans-serif;
    font-size: 13px;
    background: #c0c0c0;
    color: #000;

    /* classic fixed-app behaviour */
    overflow: hidden;
}

/* -------------------------------
   App Window (classic frame)
   ------------------------------- */

.app-window,
.wrapper,
.dashboard {
    width: 1180px;
    margin: 12px auto;
    padding: 8px;
    background: #d4d0c8;
    border: 2px solid #000;

    /* FIXED WINDOW FEEL */
    height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
}

/* -------------------------------
   Titlebar
   ------------------------------- */

.app-titlebar,
.header,
h1 {
    margin: 0 0 10px 0;
    padding: 6px 8px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    background: #0a246a;
    border: 2px outset #fff;
}

/* -------------------------------
   Main Layout
   ------------------------------- */

.app-main {
    display: flex;
    gap: 8px;
    flex: 1;
    min-height: 0; /* REQUIRED for scroll containment */
}

/* -------------------------------
   Sidebar / Tool List
   ------------------------------- */

.sidebar {
    width: 220px;
    padding: 6px;
    background: #d4d0c8;
    border: 2px groove #808080;
}

.sidebar a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    margin-bottom: 6px;

    font-size: 13px;
    font-weight: bold;
    color: #000;
    text-decoration: none;

    background: #e0e0e0;
    border: 2px outset #fff;
}

.sidebar a:last-child {
    margin-bottom: 0;
}

.sidebar a.active {
    border: 2px inset #fff;
    padding-top: 1px;
}

/* -------------------------------
   Content Area (ONLY SCROLL AREA)
   ------------------------------- */

.content {
    flex: 1;
    min-height: 0;
    padding: 6px;
    background: #ece9d8;
    border: 2px groove #808080;

    overflow-y: auto;
    overflow-x: hidden;
}

/* -------------------------------
   Sections / Panels (OPT-IN ONLY)
   ------------------------------- */

.panel,
.section {
    margin-bottom: 10px;
    background: #ece9d8;
    border: 2px groove #808080;
}

.panel_desc {
    margin-bottom: 10px;
    background: #cfe2f3;
    border: 2px groove #808080;
}

.panel_top {
    margin-bottom: 10px;
    background: white;
    border: 2px groove #808080;
}


.panel:last-child,
.section:last-child {
    margin-bottom: 0;
}

.panel-header,
.section h2 {
    margin: 0;
    padding: 4px 6px;
    font-size: 13px;
    font-weight: bold;
    background: #d4d0c8;
    border-bottom: 2px groove #808080;
    color: #000;
}

.panel-body {
    padding: 8px;
    line-height: 1.4;
}

/* -------------------------------
   Home Dashboard Containers
   (NO AUTO BORDERS)
   ------------------------------- */

.carousel,
.favourites {
    margin-bottom: 10px;
    background: #ece9d8;
    border: none;
}

/* slide headers still look like panels */
.slide-header {
    padding: 4px 6px;
    font-size: 13px;
    font-weight: bold;
    background: #d4d0c8;
    border-bottom: 2px groove #808080;
}

/* -------------------------------
   Panel Accent Headers
   ------------------------------- */

.panel-accent-blue   .panel-header,
.slide-welcome  .slide-header { background: #cfe2f3; }

.panel-accent-green  .panel-header,
.slide-updates  .slide-header { background: #d9ead3; }

.panel-accent-pink   .panel-header,
.slide-suggest  .slide-header { background: #ead1dc; }

.panel-accent-yellow .panel-header,
.slide-notes    .slide-header { background: #fff2cc; }

.panel-accent-teal   .panel-header,
.slide-contact  .slide-header { background: #d0e0e3; }

/* -------------------------------
   Inset / Sunken Areas
   ------------------------------- */

.inset {
    background: #fff;
    border: 2px inset #808080;
    padding: 6px;
}

/* -------------------------------
   Forms & Controls
   ------------------------------- */

label {
    display: block;
    margin-bottom: 2px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 2px 4px;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
    border: 2px inset #808080;
}

input[type="file"] {
    font-size: 12px;
}

button {
    padding: 3px 10px;
    font-size: 12px;
    font-family: inherit;
    font-weight: bold;
    background: #e0e0e0;
    border: 2px outset #fff;
    cursor: pointer;
}

button:active {
    border: 2px inset #fff;
}

/* -------------------------------
   Button Rows
   ------------------------------- */

.button-row {
    text-align: center;
    margin-top: 6px;
}

.button-row button {
    margin: 0 4px;
}

/* -------------------------------
   Tables
   ------------------------------- */

table {
    width: 100%;
    border-collapse: collapse;
}

td {
    padding: 4px 6px;
    border-bottom: 1px solid #b0b0b0;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

/* -------------------------------
   Images & Previews
   ------------------------------- */

.image-preview {
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* -------------------------------
   Text Utilities
   ------------------------------- */

.text-muted {
    color: #555;
    font-size: 12px;
}

.text-center {
    text-align: center;
}

.text-strong {
    font-weight: bold;
}

.highlight {
    font-weight: bold;
    color: #0a246a; /* blue emphasis ONLY */
}

/* -------------------------------
   Layout Utilities
   ------------------------------- */

.centered {
    margin-left: auto;
    margin-right: auto;
}

.inline-block {
    display: inline-block;
    vertical-align: top;
}

.spacer {
    height: 8px;
}

/* -------------------------------
   Horizontal Rule
   ------------------------------- */

hr {
    border: none;
    border-top: 2px groove #808080;
    margin: 8px 0;
}

/* ===============================
   Polaroid Cropper (OG-safe)
   =============================== */

.polacrop-shell {
    max-width: 760px;
    margin: 0 auto;
}

.polacrop-info,
.polacrop-controls,
.polacrop-work {
    background: #ece9d8;
    border: 2px groove #808080;
    padding: 8px;
    margin-bottom: 10px;
}

.polacrop-grid {
    display: block;
}

.crop-box {
    background: #fff;
    border: 2px inset #808080;
    padding: 6px;
    margin-bottom: 12px;
}

.crop-box img {
    max-width: 100%;
    display: block;
}

.crop-label {
    margin-top: 4px;
    font-size: 11px;
    text-align: center;
}

/* ================================
   SIDEBAR RESET & FIX
================================ */

.sidebar {
    padding: 8px;
}

/* Group titles */
.sidebar-group-title {
    margin: 12px 6px 4px;
    font-size: 0.65rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;              /* FIX: visible on light bg */
}

/* Sidebar buttons */
.sidebar a {
    display: block;
    padding: 6px 8px;         /* FIX: text fits */
    margin: 4px 0;
    font-size: 0.8rem;        /* FIX: smaller text */
    line-height: 1.2;
    text-decoration: none;

    color: #000;
    background-clip: padding-box;

    border-radius: 0;         /* FIX: square boxes */
    box-shadow: none;
    transform: none;
}

/* Hover (subtle, no floaty nonsense) */
.sidebar a:hover {
    filter: brightness(0.95);
}

/* Active */
.sidebar a.active {
    outline: 2px solid rgba(0, 0, 0, 0.35);
    font-weight: bold;
}

/* Home divider */
.sidebar > a:first-of-type {
    margin-bottom: 8px;
}

