:root {
  --background: #f5f6f8;
  --foreground: #2d3748;
  --card: #ffffff;
  --primary: #ff0000;
  --primary-rgb: 255, 0, 0;
  --primary-soft: #fff5f5;
  --muted: #718096;
  --accent: #edf2f7;
  --border: #e2e8f0;
  --input-bg: #ffffff;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  line-height: 1.5;
  color: var(--foreground);
}

a {
  color: inherit;
  text-decoration: none;
}

.xsmall {
  font-size: 12px;
}

.text-muted {
  color: var(--muted) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.bg-primary {
  background-color: var(--primary) !important;
}

.bg-accent {
  background: var(--accent) !important;
}

.bg-primary-soft {
  background: var(--primary-soft) !important;
}

.bg-purple {
  background: #f3e8ff !important;
}

.text-purple {
  color: #6b21a8 !important;
}

.border-app {
  border-color: var(--border) !important;
}

.btn {
  border-radius: var(--radius);
  font-weight: 500;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: #d90000;
  --bs-btn-hover-border-color: #d90000;
  --bs-btn-active-bg: #c40000;
  --bs-btn-active-border-color: #c40000;
}

.btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
}

.form-control,
.form-select {
  min-height: 42px;
  background-color: var(--input-bg);
  border-color: var(--border);
  border-radius: var(--radius);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(var(--primary-rgb), .45);
  box-shadow: 0 0 0 .2rem rgba(var(--primary-rgb), .12);
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-card {
  width: min(100%, 448px);
}

.login-logo {
  height: 64px;
  object-fit: contain;
}

.app-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.app-shell {
  height: 100vh;
  display: flex;
  overflow: hidden;
}

.sidebar {
  width: 256px;
  flex: 0 0 256px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-right: 1px solid var(--border);
  transition: width .28s ease, flex-basis .28s ease;
}

.sidebar.collapsed {
  width: 80px;
  flex-basis: 80px;
}

.sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo img {
  max-height: 40px;
  max-width: 168px;
  object-fit: contain;
}

.sidebar.collapsed .sidebar-logo img {
  max-height: 32px;
  max-width: 32px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 8px;
}

.sidebar-link {
  width: calc(100% - 8px);
  height: 48px;
  margin: 0 4px 4px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--foreground);
  border: 0;
  background: transparent;
  border-radius: var(--radius);
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-link:hover {
  background: var(--accent);
  color: var(--foreground);
}

.sidebar-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar-link i {
  width: 20px;
  font-size: 20px;
  line-height: 1;
  text-align: center;
}

.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 0;
}

.sidebar.collapsed .sidebar-link span {
  display: none;
}

.sidebar-logout {
  margin-top: auto;
  margin-bottom: 8px;
}

.main-wrap {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.topbar-title {
  font-size: 20px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .18s ease;
}

.icon-btn:hover {
  background: var(--accent);
}

.notification-btn span {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
}

.notifications {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  width: min(320px, calc(100vw - 32px));
  overflow: hidden;
}

.notification-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.notification-item:hover {
  background: var(--accent);
}

.notification-item.unread {
  background: var(--primary-soft);
}

.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.page-stack>*+* {
  margin-top: 24px;
}

.metric-card {
    padding: 24px;
    min-height: 130px;
    display: flex;
    justify-content: space-between;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 24px;
  flex: 0 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}

.table {
  margin-bottom: 0;
  color: var(--foreground);
}

.table thead th {
  background: var(--accent);
  font-size: 14px;
  font-weight: 500;
  padding: 16px;
  white-space: nowrap;
}

.table tbody td {
  padding: 16px;
  vertical-align: middle;
  border-color: var(--border);
}

.table-hover tbody tr:hover {
  --bs-table-hover-bg: var(--accent);
}

.search-icon-wrap {
  position: relative;
}

.search-icon-wrap i {
  position: absolute;
  left: 25px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-icon-wrap .form-control,
.search-icon-wrap .form-select {
  padding-left: 40px;
}

.modal-backdrop-custom {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.app-modal {
  width: min(100%, 640px);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
}

.timeline-line {
  position: absolute;
  left: 15px;
  top: 38px;
  bottom: -24px;
  width: 2px;
  background: var(--border);
}

.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.calendar-grid {
  min-width: 800px;
  position: relative;
}

.calendar-row {
  display: grid;
  grid-template-columns: 96px repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
  min-height: 60px;
}

.calendar-cell {
  border-left: 1px solid var(--border);
  padding: 8px;
}

.schedule-event {
  position: absolute;
  z-index: 5;
  padding: 8px;
  border-radius: 6px;
  background: rgba(var(--primary-rgb), .92);
  color: #fff;
  overflow: hidden;
  cursor: pointer;
}

.schedule-task-item {
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.schedule-task-item:hover,
.schedule-task-item:focus {
  border-color: rgba(var(--primary-rgb), .35);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  outline: 0;
}

.schedule-count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.schedule-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 8px;
  overflow-x: auto;
}

.schedule-month-day {
  min-height: 92px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--card);
}

.schedule-month-day span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.schedule-month-day small {
  display: block;
  padding: 6px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  line-height: 1.3;
}

.attendance-sticky {
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--card) !important;
}

thead .attendance-sticky {
  background: var(--accent) !important;
  z-index: 6;
}

.toast-host {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 120;
  display: grid;
  gap: 10px;
}

.app-toast {
  min-width: 260px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, .15);
}

.app-toast.success {
  background: #16a34a;
}

.app-toast.error {
  background: #dc2626;
}

.app-toast.info {
  background: #334155;
}

.preview-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.progress-thin {
  height: 8px;
  background: var(--accent);
  border-radius: 999px;
  overflow: hidden;
}

.progress-thin span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.spin {
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.avatar {
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 14px;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-panel {
  width: 100%;
  height: 100%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  box-shadow: 24px 0 48px rgba(15, 23, 42, .18);
  transform: translateX(-100%);
  transition: transform .28s ease;
}

.mobile-menu.is-open .mobile-panel {
  transform: translateX(0);
}

.mobile-head {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.mobile-head img {
  height: 40px;
  object-fit: contain;
}

@media (max-width: 767.98px) {
  .sidebar {
    display: none;
  }

  .topbar {
    padding: 0 16px;
  }

  .topbar-title {
    display: none;
  }

  .content-area {
    padding: 16px;
  }

  .metric-card {
    padding: 18px;
    min-height: auto;
    margin-top: 15px;
  }

  .table thead th,
  .table tbody td {
    padding: 14px;
  }

  .page-header {
    align-items: flex-start !important;
  }
}

.add-task{
  width: 175px
  ;
}
.card-value{
  font-size: 22px;
}
.btn:hover {
    color: var(--bs-btn-hover-color)!important;
}
#open-mobile-menu i{
  font-size: 24px;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.35);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #b30c0c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.loader-text {
    /*    margin-top: 12px;
    font-size: 18px;
    font-weight: 500;
    color: black;*/
    margin-top: 12px;
    padding: 6px 14px; /* spacing around text */
    background: rgb(255 255 255); /* background only behind the text */
    color: black;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px; /* curved edges */
    display: inline-block; /* background wraps text only */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.validation-text {
    min-height: 16px;
    display: block;
    color: #dc3545;
}

.chk-select-line,
#chkSelectAll {
    transform: scale(1.4);
    cursor: pointer;
    margin-left: 6px;
}

.validation-msg {
    display: block;
    min-height: 20px;
    font-size: 14px;
    white-space: nowrap;
}

.btnRemovePhoto {
    width: 30px;
    height: 30px !important;
    min-height :30px !important;
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

bg-InProgress {
    bg-color: #664d03 !important
}

.table-responsive {
    overflow-x: visible !important;
}
.mobile-logo {
    display: none
}

@media (max-width: 768px) {
    .mobile-logo {
        display: block;
        width: 80px;
    }
    td.col-quotation-customer {
        text-align: right !important;
    }

    .table-responsive {
        overflow: visible !important;
        padding: 10px;
    }

    .table thead {
        display: none !important;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block !important;
        width: 100% !important;
    }

        .table tr {
            margin-bottom: 15px !important;
            border: 1px solid #dee2e6 !important;
            border-radius: 12px !important;
            padding: 12px !important;
            background: #fff !important;
        }

        .table td {
            border: 0 !important;
            padding: 8px 0 !important;
            display: flex !important;
            justify-content: space-between !important;
            align-items: flex-start !important;
            text-align: right !important;
        }

            .table td::before {
                content: attr(data-label) !important;
                font-weight: 600 !important;
                text-align: left !important;
                margin-right: 15px !important;
               
            }

    .fc-header-toolbar {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
    }

        /* Previous/Next buttons */
        .fc-header-toolbar .fc-toolbar-chunk:nth-child(1) {
            order: 1;
            width: 30%;
            display: flex;
            justify-content: flex-start;
        }

        /* Month title */
        .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
            order: 2;
            width: 70%;
            text-align: center;
        }

        /* Daily / Weekly / Yearly buttons */
        .fc-header-toolbar .fc-toolbar-chunk:nth-child(3) {
            order: 3;
            width: 100%;
            margin-top: 10px;
            display: flex;
            justify-content: center;
        }

    .fc .fc-toolbar-title {
        text-align: right;
        font-size: 18px;
    }
    .fc .fc-button .fc-icon {
        font-size: 20px;
    }
    }
