﻿:root {
    --brand-red: #b3201d;
    --muted: #e6e6e6;
    --card-bg: #f0f0f0;
    --pill: #757575;
}

html, body {
    height: 100%
}

body {
    font-family: "Tajawal", sans-serif;
    background: #fff;
    margin: 0;
    padding: 0;
    color: #222;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* header */
.top-bar {
    height: 80px;
    background: #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.top-left {
    display: flex;
    align-items: center;
    gap: 14px
}

.logo {
    height: 46px
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg,#c33 30%, #b3201d 100%);
    color: #fff;
    padding: 8px 14px;
    border-radius: 28px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.top-controls {
    display: flex;
    align-items: center;
    gap: 12px
}

/* page layout */
.page {
    padding: 22px;
}

.layout {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

/* columns */
.col-side {
    width: 280px;
    background: var(--muted);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: calc(100vh - 150px);
    box-sizing: border-box;
}

.col-left {
    width: 260px;
    min-width: 260px
}

.col-right {
    width: 300px;
    min-width: 300px
}

/* center */
.col-center {
    flex: 1 1 auto;
    min-width: 420px;
    background: var(--muted);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: calc(100vh - 150px);
    box-sizing: border-box;
}

/* left panel content */
.panel-title {
    font-weight: 800;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.panel-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.04);
}

.small-muted {
    color: #666;
    font-size: 0.95rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px
}

.tag {
    background: #ddd;
    border-radius: 18px;
    padding: 6px 10px;
    font-weight: 600;
    color: #444
}

/* center groups */
.groups {
    overflow: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.group {
    background: transparent;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: start;
}

.group-head {
    grid-column: 1/-1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: transparent;
    color: #222;
    font-weight: 700;
}

.action-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 6px 14px rgba(0,0,0,0.03);
}

    .action-card .meta {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

        .action-card .meta .title {
            font-weight: 800
        }

        .action-card .meta .desc {
            color: #666;
            font-size: 0.95rem
        }

.action-pill {
    background: #111;
    color: #fff;
    padding: 6px 10px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

/* right panel content */
.record-title {
    font-weight: 800;
    color: var(--brand-red)
}

.record-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.04)
}

.record-grid {
    display: flex;
    flex-direction: column;
    gap: 12px
}

/* bottom area (buttons) */
.bottom-actions {
    display: flex;
    gap: 18px;
    justify-content: flex-start;
    margin-top: 12px;
}

.btn-light-ghost {
    background: #ddd;
    color: #222;
    border-radius: 12px;
    padding: 12px 22px;
    border: none;
    font-weight: 700;
}

/* scroll look */
.groups::-webkit-scrollbar {
    width: 10px
}

.groups::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 6px
}

.col-left::-webkit-scrollbar, .col-right::-webkit-scrollbar {
    width: 8px
}

.col-left::-webkit-scrollbar-thumb, .col-right::-webkit-scrollbar-thumb {
    background: #ececec;
    border-radius: 6px
}

@media (max-width:1100px) {
    .layout {
        flex-direction: column
    }

    .col-left, .col-right {
        width: 100%;
        height: auto
    }

    .col-center {
        height: auto
    }
}
/* Reusing the same CSS variables and styles from the login page */
:root {
    --brand-red: #b3201d;
    --brand-red-hover: #8e1a17;
    --input-grey: #757575;
    --bg-card: #e6e6e6;
    --bg-main: #f8f9fa;
}

body {
    font-family: "Tajawal", sans-serif;
    background-color: var(--bg-main);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- Header Styles --- */
.top-bar {
    background-color: #f0f0f0;
    padding: 10px 30px;
    height: 80px;
    border-bottom: 1px solid #e0e0e0;
}

.badge-custom {
    background-color: var(--brand-red);
    border-radius: 50px;
    padding: 8px 20px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.user-dropdown .btn {
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-btn {
    background-color: var(--brand-red);
    color: white;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
    border: none;
}

/* --- Main Layout --- */
.main-container {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    gap: 20px;
    height: calc(100vh - 80px); /* Full height minus header */
}

.content-area {
    flex: 3;
    background-color: var(--bg-card);
    border-radius: 25px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.sidebar {
    flex: 1;
    background-color: var(--bg-card);
    border-radius: 25px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* --- Content Area Elements --- */
.company-title {
    color: #333;
    margin-bottom: 20px;
}

    .company-title h3 {
        font-weight: 800;
        margin-bottom: 5px;
    }

    .company-title h4 {
        font-weight: 600;
        color: #555;
    }

.company-subtitle {
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
}

.action-buttons .btn {
    background-color: var(--input-grey);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

    .action-buttons .btn:hover {
        opacity: 0.9;
    }

/* --- Sidebar Elements --- */
.sidebar-title h5 {
    font-weight: 800;
    margin-bottom: 5px;
}

.sidebar-title p {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.module-card {
    background-color: var(--brand-red);
    color: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
}

    .module-card:hover {
        background-color: var(--brand-red-hover);
    }

.module-info h6 {
    font-weight: 800;
    margin-bottom: 5px;
}

.module-info small {
    font-weight: 500;
    opacity: 0.9;
}

.module-icon {
    background-color: white;
    color: var(--brand-red);
    border-radius: 10px;
    padding: 10px;
    font-size: 1.5rem;
}

.scroll-up-btn {
    background-color: #d1d1d1;
    border: none;
    border-radius: 10px;
    padding: 10px;
    width: 100%;
    color: #333;
    font-size: 1.2rem;
    margin-top: auto; /* Pushes to bottom */
}

.main-content-group {
    flex: 3;
    display: flex;
    flex-direction: column;
    align-items: center; /* This centers children horizontally */
}
body {
    font-family: "Tajawal", sans-serif;
    background: #f8f9fa;
}

.main-wrapper {
    padding: 24px 0 0 0;
    background: #f8f9fa;
    min-height: 100vh;
}

.item-container {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: #ededed;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    margin: 24px;
}

.item-left, .item-right {
    padding: 24px 16px;
    min-width: 260px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.item-left {
    flex: 1.2;
    margin-left: 0;
}

.item-right {
    flex: 1.2;
    margin-right: 0;
}

.item-center {
    flex: 2.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #e6e6e6;
    border-radius: 18px;
    padding: 24px 0 0 0;
    min-height: 500px;
    position: relative;
}

.item-title {
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

.item-subtitle {
    font-weight: 600;
    color: #555;
    margin-bottom: 1.2rem;
}

.item-desc-label {
    font-weight: 700;
    color: #b3201d;
    border-bottom: 2px solid #b3201d;
    padding-bottom: 0.2rem;
    margin-bottom: 0.7rem;
    display: block;
}

.item-desc {
    font-weight: 400;
    color: #222;
    font-size: 1.05rem;
    line-height: 2;
}

.serial-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
}

    .serial-box input {
        border: none;
        outline: none;
        background: transparent;
        font-size: 1.1rem;
        flex: 1;
    }

    .serial-box .btn {
        border-radius: 8px;
        font-weight: 700;
    }

.serial-error {
    color: #b3201d;
    font-size: 1rem;
    margin-right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.item-image-box {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10rem auto 16px auto;
}

    .item-image-box i {
        font-size: 4rem;
        color: #b3201d;
    }

.item-image-label {
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #444;
}

.item-actions {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin: 32px 0 0 0;
}

    .item-actions .btn {
        background: #757575;
        color: #fff;
        border-radius: 12px;
        padding: 12px 36px;
        font-weight: 700;
        font-size: 1.1rem;
        border: none;
        display: flex;
        align-items: center;
        gap: 10px;
    }
/* Sidebar right modules */
.modules-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.module-card {
    background: #b3201d;
    color: #fff;
    border-radius: 14px;
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

    .module-card.selected {
        background: #b3201d;
    }

    .module-card:not(.selected) {
        background: #cfa8a8;
        color: #222;
    }

.module-icon {
    background: #fff;
    color: #b3201d;
    border-radius: 10px;
    padding: 8px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.module-info h6 {
    font-weight: 800;
    margin-bottom: 2px;
    font-size: 1.1rem;
}

.module-info small {
    font-weight: 500;
    opacity: 0.9;
}

.sidebar-title h5 {
    font-weight: 800;
    margin-bottom: 5px;
}

.sidebar-title p {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.scroll-up-btn {
    background-color: #d1d1d1;
    border: none;
    border-radius: 10px;
    padding: 10px;
    width: 100%;
    color: #333;
    font-size: 1.2rem;
    margin-top: auto;
}

@media (max-width: 991px) {
    .item-container {
        flex-direction: column;
    }

    .item-left, .item-center, .item-right {
        max-width: 100%;
        min-width: 0;
    }
}

.bg-grey {
    background: #E7E5E4;
}

.bg-dark-grey {
    background: #D0D0D0;
}

.rounded-4 {
    border-radius: 24px;
}
body {
    font-family: "Tajawal", sans-serif;
    font-weight: 400;
    font-style: normal;
    background-color: #FFF;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background-color: #E7E5E4;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-card {
    background-color: #e9e9e9;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-control {
    background-color: #8c8c8c;
    border: none;
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

    .form-control::placeholder {
        color: #FFF;
        font-weight: 700;
    }

.btn-login {
    background-color: #b3201d;
    border: none;
    border-radius: 10px;
    padding: 10px;
}

    .btn-login:hover {
        background-color: #8e1a17;
    }

.badge-custom {
    background-color: #b3201d;
    border-radius: 20px;
    padding: 5px 15px;
    color: white;
    font-size: 0.9rem;
}

.bg-grey {
    background: #E7E5E4;
}
/* Reusing the same CSS variables and styles from the login page */
:root {
    --brand-red: #b3201d;
    --brand-red-hover: #8e1a17;
    --input-grey: #757575;
    --bg-card: #e6e6e6;
    --bg-main: #f8f9fa;
}

body {
    font-family: "Tajawal", sans-serif;
    background-color: var(--bg-main);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- Header Styles --- */
.top-bar {
    background-color: #f0f0f0;
    padding: 10px 30px;
    height: 80px;
    border-bottom: 1px solid #e0e0e0;
}

.badge-custom {
    background-color: var(--brand-red);
    border-radius: 50px;
    padding: 8px 20px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.user-dropdown .btn {
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-btn {
    background-color: var(--brand-red);
    color: white;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
    border: none;
}

/* --- Main Layout --- */
.main-container {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    gap: 20px;
    height: calc(100vh - 80px); /* Full height minus header */
}

.content-area {
    flex: 3;
    background-color: var(--bg-card);
    border-radius: 25px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.sidebar {
    flex: 1;
    background-color: var(--bg-card);
    border-radius: 25px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* --- Content Area Elements --- */
.company-title {
    color: #333;
    margin-bottom: 20px;
}

    .company-title h3 {
        font-weight: 800;
        margin-bottom: 5px;
    }

    .company-title h4 {
        font-weight: 600;
        color: #555;
    }

.company-subtitle {
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
}

.action-buttons .btn {
    background-color: var(--input-grey);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

    .action-buttons .btn:hover {
        opacity: 0.9;
    }

/* --- Sidebar Elements --- */
.sidebar-title h5 {
    font-weight: 800;
    margin-bottom: 5px;
}

.sidebar-title p {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.module-card {
    background-color: var(--brand-red);
    color: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
}

    .module-card:hover {
        background-color: var(--brand-red-hover);
    }

.module-info h6 {
    font-weight: 800;
    margin-bottom: 5px;
}

.module-info small {
    font-weight: 500;
    opacity: 0.9;
}

.module-icon {
    background-color: white;
    color: var(--brand-red);
    border-radius: 10px;
    padding: 10px;
    font-size: 1.5rem;
}

.scroll-up-btn {
    background-color: #d1d1d1;
    border: none;
    border-radius: 10px;
    padding: 10px;
    width: 100%;
    color: #333;
    font-size: 1.2rem;
    margin-top: auto; /* Pushes to bottom */
}

.main-content-group {
    flex: 3;
    display: flex;
    flex-direction: column;
    align-items: center; /* This centers children horizontally */
}
.serial-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
}

    .serial-box input {
        border: none;
        outline: none;
        background: transparent;
        font-size: 1.1rem;
        flex: 1;
    }

    .serial-box .btn {
        border-radius: 8px;
        font-weight: 700;
    }

.serial-error {
    color: #b3201d;
    font-size: 1rem;
    margin-right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.item-image-box {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10rem auto 16px auto;
}

    .item-image-box i {
        font-size: 4rem;
        color: #b3201d;
    }
/* visual feedback for selected module-card (toggle state) */
.module-card {
    transition: background-color .18s ease, color .18s ease, transform .08s ease;
}

    .module-card.selected {
        background-color: var(--brand-red);
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    }

        .module-card.selected .module-info h6,
        .module-card.selected .module-info small {
            color: #fff;
        }
        /* keep icon contrast */
        .module-card.selected .module-icon {
            background: #fff;
            color: var(--brand-red);
        }

    /* ensure anchor cards behave like block */
    .module-card.text-decoration-none {
        display: flex;
    }

/* left camera area */
.cam-wrap {
    flex: 1 1 0;
    min-width: 0;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.cam-frame {
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    height: 520px;
}

    .cam-frame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        filter: grayscale(0.4);
    }

.cam-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
}

/* right controls */
.controls {
    width: 100%;
    display: flex;
    gap: 14px;
}

.control-card {
    background: transparent;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.ctrl-title {
    font-weight: 800;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.btn-step {
    width: 56px;
    height: 44px;
    border-radius: 8px;
    border: none;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-minus {
    background: #b3201d;
}

.btn-plus {
    background: #2fa05a;
}

.value-pill {
    background: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 56px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.04)
}

.mode-btn {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    font-weight: 800;
    color: #fff;
    background: var(--brand-red);
    text-align: center;
}

    .mode-btn.inactive {
        background: #9a9a9a;
        color: #fff;
        font-weight: 700;
    }

.measure-row {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

    .measure-row input {
        width: 110px;
        border-radius: 8px;
        border: none;
        padding: 10px;
        background: #fff;
        text-align: center;
    }

    .measure-row .result {
        background: #efefef;
        padding: 10px 12px;
        border-radius: 8px;
        min-width: 100px;
        text-align: center;
    }

.back-btn {
    margin-top: 18px;
    background: var(--brand-red);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(179,32,29,0.12);
}

/* small helpers */
.muted-sm {
    color: #666;
    font-weight: 600;
}

.icon-muted {
    color: var(--brand-red);
    font-size: 18px;
    margin-left: 6px;
}

@media (max-width:991px) {
    .page-card {
        flex-direction: column;
    }

    .controls {
        width: 100%;
    }

    .cam-frame {
        height: 340px;
    }
}