/* ===== Layout & typography ===== */
html, body { min-height: 100%; }

body {
    padding-top: 60px;
    padding-bottom: 30px;
    background: #f7f7f9;
    color: #2c2c33;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* sidebar layout overrides body padding because the fixed sidebar handles spacing */
body.sidebar-layout { padding-top: 0; }

a { transition: color 0.15s ease-in-out; }

h1, h2, h3, h4 { color: #2c2c33; }
h1 { margin-top: 0.4em; margin-bottom: 0.6em; }
h2 { margin-top: 0.4em; margin-bottom: 0.5em; }

/* ===== Page container ===== */
.body-content {
    padding: 24px 24px 48px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-top: 8px;
}

.col-md-10.body-content {
    padding: 28px 32px 56px;
    margin-top: 0;
    min-height: calc(100vh - 30px);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid #ececec; color: #888; font-size: 13px; }
footer p { margin: 0; }

/* ===== Forms ===== */
.form-horizontal .form-group { margin-bottom: 18px; }
.form-control {
    box-shadow: none;
    border-radius: 4px;
    border-color: #d6d6d6;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
    border-color: #c80000;
    box-shadow: 0 0 0 3px rgba(200,0,0,0.12);
    outline: 0;
}
label { font-weight: 600; color: #4a4a4f; }
.control-label { padding-top: 8px; }

input, select, textarea { max-width: 360px; }
input.form-control[type="checkbox"] { max-width: none; }

/* ===== Buttons ===== */
.btn { border-radius: 4px; padding: 7px 16px; font-weight: 500; transition: all 0.15s ease-in-out; }
.btn-danger { background: #c80000; border-color: #b00000; }
.btn-danger:hover, .btn-danger:focus { background: #a30000; border-color: #800000; }
.btn-default { background: #fff; border-color: #d0d0d0; color: #4a4a4f; }
.btn-default:hover, .btn-default:focus { background: #f4f4f4; border-color: #b0b0b0; color: #2c2c33; }
.btn-primary { background: #2b6cb0; border-color: #245d99; }
.btn-primary:hover, .btn-primary:focus { background: #245d99; }
.btn + .btn { margin-left: 8px; }

/* ===== Tables ===== */
.table { background: #fff; margin-bottom: 0; }
.table > thead > tr > th {
    background: #f1f1f4; color: #4a4a4f; font-weight: 600;
    border-bottom: 2px solid #e0e0e3;
    padding: 12px 14px;
}
.table > tbody > tr > td { padding: 12px 14px; vertical-align: middle; border-color: #ececec; }
.table-hover > tbody > tr:hover { background: #fafafa; }
.table-striped > tbody > tr:nth-of-type(odd) { background: #fcfcfd; }

.table-data-center-middle tr th,
.table-data-center-middle tr td { text-align: center !important; vertical-align: middle !important; }

/* ===== Toolbar header on each page ===== */
.toolbarTop {
    margin-bottom: 28px;
    background: #f5f5f7;
    border: 1px solid #ececec;
    border-radius: 6px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.toolbarTop p { margin: 0; }

/* ===== Navbar (fixed top) ===== */
.navbar.navbar-inverse {
    border: 0; border-radius: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    margin-bottom: 0;
}
.navbar-brand { font-weight: 600; letter-spacing: 0.3px; }
.navbar-nav > li > a { padding: 18px 16px; }
a.Link-White:link,
a.Link-White:visited { color: #FFF !important; }
a.Link-White:hover,
a.Link-White:focus { color: #FFFA00 !important; }

/* ===== Sidebar (in _Layout_sidebar) ===== */
.sidebar-layout .list-group { clear: both; position: relative; z-index: 1; }
.sidebar-layout .list-group-item {
    padding: 12px 18px;
    font-size: 14px;
    transition: background 0.15s, padding-left 0.15s;
}
.sidebar-layout .user-actions::after { content: ""; display: table; clear: both; }
.sidebar-layout .list-group-item:hover { padding-left: 22px; }
.sidebar-layout .childItem { padding-left: 36px !important; }
.sidebar-layout .childItem:hover { padding-left: 40px !important; }
.sidebar-layout .ActiveMenu { padding-left: 14px !important; }

/* ===== Pagination ===== */
.pagination { border-radius: 4px; }
.pagination > li > a, .pagination > li > span { color: #c80000; padding: 7px 12px; }
.pagination > .active > a, .pagination > .active > span,
.pagination > .active > a:hover, .pagination > .active > span:hover,
.pagination > .active > a:focus, .pagination > .active > span:focus {
    background-color: #c80000 !important; border-color: #c80000 !important;
}

/* ===== Selected row (used in CRUD lists) ===== */
.SelectedRow,
.SelectedRow > td,
.SelectedRow .selectTD {
    background-color: #c80000 !important; color: #fff !important; font-weight: 600;
}

/* ===== Modals ===== */
.modal-content { border-radius: 6px; box-shadow: 0 6px 30px rgba(0,0,0,0.18); }
.modal-header { background: #f5f5f7; border-radius: 6px 6px 0 0; }
.modal-title { font-weight: 600; }

/* ===== Cards / panels ===== */
.panel { border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); border-color: #ececec; }
.panel-default > .panel-heading { background: #f5f5f7; border-bottom: 1px solid #ececec; }

/* ===== Dashboard tiles (Home/Index) ===== */
.dashboard-tiles { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 8px; }
.dashboard-tile {
    flex: 1 1 220px; min-height: 130px;
    border-radius: 8px; padding: 22px;
    background: #fff; border: 1px solid #ececec;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex; flex-direction: column; justify-content: space-between;
    transition: transform 0.15s, box-shadow 0.15s;
    color: #2c2c33; text-decoration: none;
}
.dashboard-tile:hover, .dashboard-tile:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #2c2c33;
}
.dashboard-tile .tile-icon { font-size: 28px; color: #c80000; margin-bottom: 12px; }
.dashboard-tile .tile-title { font-size: 18px; font-weight: 600; color: #2c2c33; margin-bottom: 4px; }
.dashboard-tile .tile-desc { font-size: 13px; color: #888; }

/* ===== Misc ===== */
.dl-horizontal dt { white-space: normal; }
.NoData { display: none !important; }
.ui-dialog-titlebar-close { display: none !important; }
.ui-widget-header { background: #c80000 !important; color: #fff !important; }

.cell-positive { color: #1e8e3e; font-weight: 600; }
.cell-negative { color: #c80000; font-weight: 600; }

.btnComponentButtons { color: #fff; background: #c80000; border-color: #b00000; }
.btnComponentButtons:hover { color: #fff; background: #a30000; }

/* ===== Flip card (recipe component cards) ===== */
.flip { perspective: 800px; position: relative; margin-bottom: 20px; }
.flip .card { width: 100%; height: 100%; transform-style: preserve-3d; transition: 0.5s; }
.flip .card.flipped { transform: rotateY(-180deg); }
.flip .card .face {
    border-radius: 8px; width: 100%; height: 100%;
    position: absolute; z-index: 2; backface-visibility: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.flip .card .front { background: #fff; color: #2c2c33; border: 1px solid #ececec; }
.flip .card .back { background: #fff; color: #2c2c33; border: 1px solid #ececec; transform: rotateY(-180deg); }
