/* ============================= */
/* GLOBAL STYLES                 */
/* ============================= */
body {
    background-color: #f4f6f8;
    font-family: 'Inter', sans-serif;
}

/* ============================= */
/* DASHBOARD CARDS               */
/* ============================= */
.dashboard-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.card-header-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
}

/* HEADER */
.dashboard-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
}

.header-left{
    display:flex;
    flex-direction:column;
}

.dashboard-title{
    font-weight:700;
    color:#2c3e50;
    font-size:26px;
}

.dashboard-title i{
    color:#4f6df5;
    margin-right:8px;
}

.dashboard-subtitle{
    font-size:13px;
    color:#8a94a6;
}

/* SEARCH */
.search-box{
    position:relative;
    width:320px;
}

.search-box i{
    position:absolute;
    left:12px;
    top:10px;
    color:#9aa4b2;
}

.search-box input{
    width:100%;
    padding:8px 12px 8px 35px;
    border-radius:8px;
    border:1px solid #e2e6ea;
}

/* STAT CARDS */
.stat-row{
    margin-top:0px;
}

.stat-card{
    display:flex;
    align-items:center;
    gap:15px;
    padding:20px;
    border-radius:14px;
    background:white;
    box-shadow:0 6px 18px rgba(0,0,0,0.06);
}

.stat-icon{
    width:45px;
    height:45px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    color:white;
}

.stat-label{
    font-size:13px;
    color:#7b8794;
}

.stat-card h3{
    margin:0;
}

.success .stat-icon{background:#22c55e;}
.danger .stat-icon{background:#ef4444;}
.primary .stat-icon{background:#4f6df5;}
.warning .stat-icon{background:#facc15;}
.dark .stat-icon{background:#1f2937;}

#lastUpdated{
    font-size:12px;
    color:#8a94a6;
    margin-top:10px;
    text-align:right;
}

/* GRID */
.agent-grid{
    margin-top:20px;
}

/* CARD */
.modern-card{
    border-radius:16px;
    background:white;
    padding:15px;
    text-align:center;
    transition:0.25s;
    box-shadow:0 4px 14px rgba(0,0,0,0.06);
}

.modern-card:hover{
    transform:translateY(-5px);
}

/* ONLINE CARD */
.online-card{
    border:2px solid #22c55e;
    box-shadow:0 0 12px rgba(34,197,94,0.7);
}

/* LATE CARD */
.late-card{
    border:2px solid #facc15;
    box-shadow:0 0 12px rgba(250,204,21,0.7);
}

/* SHIFT OUT CARD */
.shiftout-card{
    border:2px solid #374151; /* dark gray */
    box-shadow:0 0 12px rgba(55,65,81,0.7);
}

/* OFFLINE CARD */
.offline-card{
    border:none;
}

/* AVATAR */
.avatar-wrapper{
    position:relative;
    display:inline-block;
}

.avatar-img{
    width:72px;
    height:72px;
    border-radius:50%;
    object-fit:cover;
    border:3px solid #f1f3f6;
}

/* STATUS DOT */
.status-dot{
    position:absolute;
    bottom:3px;
    right:3px;
    width:14px;
    height:14px;
    border-radius:50%;
    border:2px solid white;
}

.status-dot.online{
    background:#22c55e;
}

.status-dot.late{
    background:#facc15;
}
	
.status-dot.shiftout{ 
    background:#374151;
}

.status-dot.offline{
    background:#ef4444;
}

.agent-card h6{
    font-weight:600;
    margin-top:10px;
}

.last-seen{
    font-size:12px;
    color:#888;
}

.agent-last-log{
    font-size:12px;
    margin-top:6px;
    color:#555;
}
	
/* Flash effect for newly time-in employees */
.new-timein {
    animation: flashGreen 1s ease-in-out 3; /* flashes 3 times */
}

@keyframes flashGreen {
    0%, 100% { box-shadow: 0 0 12px rgba(34,197,94,0.7); }
    50% { box-shadow: 0 0 30px rgba(34,197,94,1); }
}


/* ============================= */
/* CUSTOM PILLS (BLUE-GREEN)     */
/* ============================= */
.custom-pills .nav-link {
    border: none;
    background: none;
    color: #495057; /* softer dark */
    position: relative;
    padding-bottom: 8px;
    margin-right: 20px;
    border-radius: 0;
    transition: all 0.3s ease;
}

/* Active tab */
.custom-pills .nav-link.active {
    background-color: transparent !important;
    color: #0d6efd; /* blue */
    font-weight: 600;
}

/* Underline indicator */
.custom-pills .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #0d6efd, #20c997); /* blue → green */
    border-radius: 2px;
}

/* Hover effect */
.custom-pills .nav-link:hover {
    color: #20c997; /* green on hover */
}

/* ============================= */
/* GRADIENTS                     */
/* ============================= */
.bg-gradient-success {
    background: linear-gradient(to bottom right, #20c997, #198754);
}

.bg-gradient-warning {
    background: linear-gradient(to bottom right, #0dcaf0, #0d6efd);
}

.bg-gradient-danger {
    background: linear-gradient(to bottom right, #dc3545, #ff6b6b);
}

.bg-gradient-primary {
    background: linear-gradient(to bottom right, #0d6efd, #20c997);
}

/* ============================= */
/* CARD STYLE FOR REQUEST INFO   */
/* ============================= */
.atm-card {
    background-color: #e3f2fd; /* light blue */
    border-radius: 30px;
    padding: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.atm-row {
    display: flex;
    flex-direction: column; /* stack instead of side-by-side */
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.atm-label {
    font-size: 12px;
    font-weight: 600;
    color: #457b9d; /* muted blue */
    margin-bottom: 4px;
}

#atm3col {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    min-width: 900px; /* forces horizontal scroll */
}

#atm3col div {
    display: flex;
    flex-direction: column;
}

.horizontal-scroll {
    overflow-x: auto;
    white-space: nowrap;
}

.atm-value {
    font-weight: bold;
    color: #1b4332; /* deep green */
    word-break: break-word;
}

.atm-info-card hr {
    border-color: rgba(33, 150, 243, 0.2); /* soft blue line */
    margin: 1rem 0;
}

/* ============================= */
/* CARD ELEMENTS                 */
/* ============================= */

/* Remove chip */
.card-chip {
    display: none;
}

/* Number */
.card-number {
    font-size: 1.0rem;
    letter-spacing: 3px;
    margin-bottom: 18px;
    font-weight: 600;
    color: #1565c0; /* strong blue */
}

/* Labels */
.card-name {
    font-size: 1.2rem;
    text-transform: uppercase;
    color: rgba(27, 67, 50, 0.7); /* green tint */
}

.card-expiry {
    font-size: 0.75rem;
    color: rgba(27, 67, 50, 0.5);
}

/* Brand */
.card-brand {
    position: absolute;
    bottom: 20px;
    right: 20px;

    font-size: 1.3rem;
    font-weight: bold;
    font-style: italic;

    color: #2e7d32; /* green */
}

/* ============================= */
/* ATM CARD (MAIN UI)            */
/* ============================= */
.atm-card.matte {
    padding: 24px;
    border-radius: 20px;

    background: linear-gradient(to bottom right, #0d6efd, #20c997);
    color: #ffffff;

    box-shadow: 
        0 10px 25px rgba(0,0,0,0.25),
        inset 0 0 1px rgba(255,255,255,0.2);

    position: relative;
    overflow: hidden;
}

/* Hover 
.atm-card.matte:hover {
    transform: translateY(-4px) scale(1.01);
	border-radius: 20px;
    box-shadow: 
        0 15px 35px rgba(0,0,0,0.35),
        inset 0 0 1px rgba(255,255,255,0.3);
}*/

/* ============================= */
/* MATTE OVERLAY                 */
/* ============================= */
.atm-card.matte::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}

/* ============================= */
/* SHINE EFFECT (PRESERVED)      */
/* ============================= */
.atm-card.matte::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 30%;
    height: 100%;

    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.15),
        transparent
    );

    transform: skewX(-20deg);
    animation: shineSwipe 4s infinite;
    pointer-events: none;
}

/* Animation */
@keyframes shineSwipe {
    0% { left: -120%; }
    50% { left: 120%; }
    100% { left: 120%; }
}

/* ============================= */
/* PROFILE PHOTO                 */
/* ============================= */
.atm-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.2);
    object-fit: cover;
}

/* ============================= */
/* FORM                          */
/* ============================= */
.atm-form .form-control {
    border-radius: 12px;
    border: none;
    padding: 12px;
    background: #e9f7f5;
    color: #333;
}

.atm-form .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(13,110,253,0.4);
}

/* BUTTON */
.atm-btn {
    border-radius: 30px;
    padding: 10px 22px;
    background: #0d6efd;
    color: #fff;
    transition: all 0.2s ease;
}

.atm-btn:hover {
    background: #20c997;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

/* ============================= */
/* REQUEST BUTTON                */
/* ============================= */
.request-btn {
    background-color: #e6f4ea;
    border: 2px solid #20c997;
    border-radius: 10px;
    color: #198754;
    font-weight: 600;
}

.request-btn:hover {
    background: linear-gradient(135deg, #0d6efd, #20c997);
    color: #fff;
}

/* ============================= */
/* LEARNER CARD                  */
/* ============================= */
.atm-learner-card {
    background: #e9f7f5;
    border-left: 4px solid #20c997;
}

/* ============================= */
/* SIDE PANELS                   */
/* ============================= */
.left-side {
    background: linear-gradient(135deg, #0d6efd, #20c997);
    color: #fff;
}

.right-side {
    background: linear-gradient(135deg, #198754, #0d6efd);
}

/* ============================= */
/* MODERN CARD (BLUE-GREEN)      */
/* ============================= */
.class-card-modern {
    border-radius: 12px;
    padding: 16px;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
    font-family: 'Segoe UI', sans-serif;

    /* ✅ Gradient theme */
    background: linear-gradient(135deg, #0d6efd, #198754);
    color: #ffffff;

    position: relative;
    overflow: hidden;
}

/* ============================= */
/* CARD HOVER EFFECT             */
/* ============================= */
.class-card-modern:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.35);
}

/* ============================= */
/* CARD LABEL                    */
/* ============================= */
.class-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================= */
/* CARD CONTENT TEXT             */
/* ============================= */
.class-card-modern span,
.class-card-modern p {
    color: #ffffff;
    font-size: 0.95rem;
}

/* ============================= */
/* OPTIONAL GLOW EFFECT          */
/* ============================= */
.class-card-modern::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -30%;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
}

/* ============================= */
/* STATUS COLORS                 */
/* ============================= */
.status-inprogress {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.status-completed {
    background-color: #e6f4ea;
    color: #198754;
}

.status-closed {
    background-color: #fdecea;
    color: #dc3545;
}

/* ============================= */
/* METRIC CARDS                  */
/* ============================= */
.metric-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.8rem 1.6rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.metric-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, #0d6efd, #20c997); /* blue → green */
    border-radius: 0 0 4px 0;
    transition: width 0.3s ease;
}

.metric-card:hover::before { 
    width: 100%; 
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.metric-title {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #6c757d;
    text-transform: uppercase;
}

.metric-icon {
    font-size: 1.5rem;
    opacity: 0.8;
    color: #0d6efd; /* blue accent */
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.metric-sub {
    font-size: 0.85rem;
    font-weight: 500;
    color: #adb5bd;
    margin: 0;
}

.metric-card:hover .metric-value { 
    color: #20c997; /* green on hover */
}

/* ============================= */
/* TABLE SCHEDULE STYLE          */
/* ============================= */
.table-schedule {
    width: 100%;
    border-collapse: collapse;
}

/* HEADER */
.table-schedule thead th {
    background: linear-gradient(135deg, #0d6efd, #198754);
    color: #fff;
    text-align: center;
    padding: 10px;

    /* ✅ allow wrapping */
    white-space: normal;
    word-break: break-word;
    font-size: 13px;
}

/* BODY CELLS */
.table-schedule td {
    vertical-align: top;
    padding: 8px;
    height: 100px;

    /* ✅ prevent overflow */
    word-break: break-word;
}

/* TIME COLUMN */
.time-cell {
    font-weight: 600;
    text-align: center;
    background: #f1f5ff;
    color: #0d6efd;
    white-space: nowrap;
}

/* ============================= */
/* CLASS CARD (BLUE-GREEN)       */
/* ============================= */
.class-card {
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 6px;

    background: linear-gradient(135deg, #0d6efd, #198754);
    color: #fff;

    font-size: 12px;
    line-height: 1.3;

    transition: 0.2s ease;
}

/* Hover */
.class-card:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}

/* TITLE */
.class-title {
    font-weight: 600;
    font-size: 13px;
}

/* SUBJECT */
.class-sub {
    font-size: 11px;
    opacity: 0.9;
}

/* ============================= */
/* RESPONSIVE FIX                */
/* ============================= */
.table-responsive {
    overflow-x: auto;
}

/* MOBILE */
@media (max-width: 768px) {
    .table-schedule td {
        height: auto;
    }

    .class-card {
        font-size: 11px;
        padding: 6px;
    }

    .table-schedule thead th {
        font-size: 11px;
    }
}

/* ============================= */
/* SCROLLBAR                     */
/* ============================= */
.table-container::-webkit-scrollbar-thumb {
    background: #20c997;
}

/* =========================
   PANEL
========================= */
.panel.rounded-4 {
  padding: 16px;
  background: #e8f5f2; /* light aqua */
  border-radius: 12px;
  color: #0f3d3e;
  max-height: 700px;
  display: flex;
  flex-direction: column;
}

.panel.rounded-4::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* =========================
   SEARCH BAR
========================= */
.mb-3 {
  flex: 0 0 auto;
}

#search-input {
  background: #f0fbfa;
  border: 1px solid #4db6ac;
  border-radius: 6px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}

/* =========================
   PRODUCT GRID CONTAINER
========================= */
.product-grid-container {
  flex: 1 1 auto;
  overflow-y: auto;
  margin-top: 8px;
  max-height: 100%;
}

.product-grid-container::-webkit-scrollbar {
  width: 8px;
}
.product-grid-container::-webkit-scrollbar-thumb {
  background: #4db6ac;
  border-radius: 4px;
}

/* =========================
   PRODUCT GRID
========================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-items: stretch;
}

/* =========================
   NO RESULTS
========================= */
.no-results {
  display: none;
  text-align: center;
  color: #26a69a;
  grid-column: 1 / -1;
  padding: 20px;
  font-weight: 500;
}

/* =========================
   PRODUCT CARD
========================= */
.cart {
  display: flex;
  flex-direction: column;
  background: #1e3a5f; /* deep blue */
  border-radius: 8px;
  padding: 8px;
  border: 1px solid rgba(77, 182, 172, 0.3);
  color: #e0f7fa;
  transition: all 0.3s ease;
  height: 100%;
}

.cart:hover {
  background: #254a75;
  border-color: #26a69a;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 20px rgba(38, 166, 154, 0.35);
}

.cart-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 0 8px 8px;
}

.mt-auto {
  margin-top: auto;
}

/* =========================
   IMAGE
========================= */
.product-img-container {
  width: 100%;
  padding-top: 66.66%;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(77, 182, 172, 0.25);
  margin-bottom: 6px;
}

.product-img-container img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s;
}

.product-img-container img:hover {
  transform: scale(1.05);
}

/* =========================
   TEXT
========================= */
.cart-title {
  font-weight: 600;
  color: #80deea;
  font-size: 14px;
}

.cart-sub {
  font-size: 12px;
  color: #b2dfdb;
  line-height: 1.3;
}

.cart-price {
  color: #00e676;
  font-weight: 600;
  margin: 4px 0;
}

.cart-stock {
  font-size: 12px;
  color: #a5d6a7;
}

/* =========================
   BUTTON
========================= */
.cart-btn {
  background: #26a69a;
  color: #ffffff;
  border: none;
  padding: 8px;
  border-radius: 4px;
  width: 100%;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cart-btn:hover:not(:disabled) {
  background: #2bbbad;
}

.cart-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

/* =========================
   HIGHLIGHT
========================= */
.highlight {
  background: #00e676;
  color: #00332a;
  padding: 1px 3px;
  border-radius: 3px;
}

/* =========================
   CART RECEIPT
========================= */
.cart-receipt {
  background: #1e3a5f;
  color: #ffffff;
  border: 1px solid rgba(77, 182, 172, 0.3);
  border-radius: 10px;
}

.cart-header {
  color: #0f3d3e;
}

/* =========================
   CART ITEMS
========================= */
.cart-items {
  max-height: 300px;
  overflow-y: auto;
}

.cart-items::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-thumb {
  background: #4db6ac;
}

/* =========================
   CART ROW
========================= */
.cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.2);
}

.cart-item-left {
  width: 40px;
}

.cart-item-right {
  flex: 1;
  text-align: right;
}

.qty {
  font-weight: bold;
  color: #0f3d3e;
}

.item-name {
  color: #0f3d3e;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================
   SUMMARY
========================= */
.cart-summary {
  color: #0f3d3e;
}

/* =========================
   ACTION BUTTONS
========================= */
.cart-actions {
  display: flex;
  gap: 8px;
}

.cart-actions .btn {
  flex: 1;
}

.cart-actions .btn-warning {
  background: #26a69a;
  color: #ffffff;
}

.cart-actions .btn-warning:hover {
  background: #2bbbad;
}