/* ==========================================================================
   ServeDesk — Server Ticket Portal — Custom styles (layered on Bootstrap 5)
   ========================================================================== */

:root{
  --brand:#073e8d;
  --brand-dark:#4338ca;
  --brand-light:#eef2ff;
  --ink:#111827;
  --ink-soft:#374151;
  --muted:#6b7280;
  --bg-app:#f5f6fb;
  --line:#e5e7eb;
  --radius:12px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body{
  font-family:var(--font);
  color:var(--ink);
  background:var(--bg-app);
}
a{ text-decoration:none; }
.text-brand{ color:var(--brand) !important; }
.bg-brand{ background:var(--brand) !important; }

/* ---------- Buttons ---------- */
.btn-brand{ background:var(--brand); border-color:var(--brand); color:#fff; }
.btn-brand:hover{ background:var(--brand-dark); border-color:var(--brand-dark); color:#fff; }
.btn-outline-brand{ border-color:var(--brand); color:var(--brand); }
.btn-outline-brand:hover{ background:var(--brand); color:#fff; }

/* ---------- Login ---------- */
.login-wrap{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, var(--brand-light) 0%, #ffffff 60%);
  padding:24px;
}
.login-card{
  background:#fff; border-radius:18px; box-shadow:0 30px 60px -25px rgba(17,24,39,.25);
  overflow:hidden; max-width:920px; width:100%;
}
.login-side{
  background:linear-gradient(160deg, var(--brand), #7c3aed);
  color:#fff; padding:48px; display:flex; flex-direction:column; justify-content:center;
}
.login-side ul li{ padding:8px 0; display:flex; gap:10px; align-items:flex-start; }
.login-form-side{ padding:48px; }

/* ==========================================================================
   DASHBOARD SHELL
   ========================================================================== */
.dash-body{ background:var(--bg-app); min-height:100vh; }

.sidebar{
  width:260px; background:#ffffff; min-height:100vh; position:fixed; top:0; left:0; z-index:1030;
  display:flex; flex-direction:column; transition:transform .25s ease;
  border-right:1px solid var(--line); box-shadow:2px 0 10px rgba(17,24,39,.03);
}
.sidebar-brand{
  display:flex; align-items:center; gap:10px; padding:20px 22px; color:var(--ink); font-weight:800; font-size:1.15rem;
  border-bottom:1px solid var(--line);
}
.sidebar-nav{ padding:16px 12px; flex:1; overflow-y:auto; }
.sidebar-nav .nav-link{
  color:var(--ink-soft); padding:11px 14px; border-radius:10px; font-size:.92rem; font-weight:500;
  display:flex; align-items:center; gap:12px; margin-bottom:4px; transition:.15s;
}
.sidebar-nav .nav-link i{ font-size:1.05rem; width:20px; text-align:center; }
.sidebar-nav .nav-link:hover{ background:var(--brand-light); color:var(--brand); }
.sidebar-nav .nav-link.active{ background:var(--brand); color:#fff; }
.sidebar-section-label{ color:#9ca3af; font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; font-weight:700; padding:14px 14px 6px; }
.sidebar-footer{ padding:16px; border-top:1px solid var(--line); }
.sidebar-user{ display:flex; align-items:center; gap:10px; color:var(--ink); }
.sidebar-user .avatar{ width:36px; height:36px; border-radius:50%; background:var(--brand); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; }
.sidebar-user small{ color:var(--muted); display:block; }

.main-wrap{ margin-left:260px; min-height:100vh; display:flex; flex-direction:column; transition:margin .25s ease; }

.topbar{
  background:#fff; border-bottom:1px solid var(--line); padding:14px 24px;
  display:flex; align-items:center; justify-content:space-between; gap:16px; position:sticky; top:0; z-index:1020;
}
.topbar .btn-menu{ display:none; }
.topbar-icon-btn{
  width:40px; height:40px; border-radius:10px; border:1px solid var(--line); background:#fff;
  display:flex; align-items:center; justify-content:center; color:var(--ink-soft); position:relative;
}
.topbar-icon-btn .badge-dot{
  position:absolute; top:-4px; right:-4px; background:#ef4444; color:#fff; font-size:.62rem;
  min-width:16px; height:16px; border-radius:999px; display:flex; align-items:center; justify-content:center; padding:0 3px;
}

.page-content{ padding:28px; flex:1; }
.page-title{ font-weight:800; letter-spacing:-.5px; }
.breadcrumb-mini{ font-size:.83rem; color:var(--muted); }

.stat-card{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:20px; }
.stat-card .stat-icon{ width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.15rem; }
.stat-card .stat-num{ font-size:1.5rem; font-weight:800; }
.stat-card .stat-label{ color:var(--muted); font-size:.85rem; }

.card-panel{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); }
.card-panel .card-panel-head{ padding:18px 22px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.card-panel .card-panel-body{ padding:22px; }

/* ---------- Requests table ---------- */
.table-requests thead th{ font-size:.78rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); border-bottom-width:1px; }
.table-requests td{ vertical-align:middle; font-size:.8rem; }

.spec-chip{
  display:inline-block; background:var(--brand-light); color:var(--brand); font-size:.74rem; font-weight:600;
  padding:3px 9px; border-radius:999px; margin:1px 2px 1px 0;
}

/* Status badges — server request workflow */
.badge-status{ font-weight:600; font-size:.76rem; padding:6px 10px; border-radius:999px; white-space:nowrap; }
.badge-status.pending{ background:#fef3c7; color:#92400e; }
.badge-status.approved{ background:#dbeafe; color:#1e40af; }
.badge-status.processing{ background:#ffedd5; color:#9a3412; }
.badge-status.configuration{ background:#ede9fe; color:#5b21b6; }
.badge-status.success{ background:#dcfce7; color:#166534; }

/* Status update dropdown (in Server Request table) */
.status-select{ font-size:.8rem; font-weight:600; padding:6px 10px; border-radius:8px; }

/* Priority badges (Server Requirement form / table) */
.badge-priority{ font-weight:600; font-size:.74rem; padding:5px 9px; border-radius:999px; }
.badge-priority.low{ background:#f1f5f9; color:#334155; }
.badge-priority.medium{ background:#dbeafe; color:#1e40af; }
.badge-priority.high{ background:#ffedd5; color:#9a3412; }
.badge-priority.urgent{ background:#fee2e2; color:#991b1b; }

.timeline-status{ display:flex; align-items:center; gap:0; margin-top:6px; }
.timeline-status .ts-step{ flex:1; text-align:center; position:relative; }
.timeline-status .ts-dot{
  width:14px; height:14px; border-radius:50%; background:var(--line); margin:0 auto 6px; position:relative; z-index:2;
}
.timeline-status .ts-step.done .ts-dot{ background:var(--brand); }
.timeline-status .ts-step::before{
  content:''; position:absolute; top:6px; left:-50%; width:100%; height:2px; background:var(--line); z-index:1;
}
.timeline-status .ts-step:first-child::before{ display:none; }
.timeline-status .ts-step.done::before{ background:var(--brand); }
.timeline-status .ts-label{ font-size:.72rem; color:var(--muted); font-weight:600; }
.timeline-status .ts-step.done .ts-label{ color:var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px){
  .sidebar{ transform:translateX(-100%); }
  .sidebar.show{ transform:translateX(0); box-shadow:20px 0 60px rgba(0,0,0,.25); }
  .main-wrap{ margin-left:0; }
  .topbar .btn-menu{ display:inline-flex; }
  .login-side{ display:none; }
}

@media (max-width: 575.98px){
  .page-content{ padding:18px; }
  .topbar{ padding:12px 16px; }
}

.sidebar-backdrop{
  display:none; position:fixed; inset:0; background:rgba(17,24,39,.5); z-index:1025;
}
.sidebar-backdrop.show{ display:block; }


.btn-group-sm>.btn, .btn-sm {
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.5rem;
    --bs-btn-font-size: 0.8rem;
    --bs-btn-border-radius: var(--bs-border-radius-sm);
}

/* ==========================================================================
   server status popup
   ========================================================================== */
   
   
.timeline{
    position:relative;
    margin-left:25px;
}

.timeline:before{
    content:'';
    position:absolute;
    left:18px;
    top:0;
    bottom:0;
    width:3px;
    background:#d9e7ff;
}

.timeline-card{

    position:relative;

    margin-bottom:30px;

    padding-left:55px;

}

.timeline-icon{

    position:absolute;

    left:0;

    width:40px;

    height:40px;

    border-radius:50%;

    background:#073e8d;

    color:#fff;

    display:flex;

    align-items:center;

    justify-content:center;

    box-shadow:0 5px 18px rgba(13,110,253,.3);

    z-index:10;

}

.timeline-content{

    background:#fff;

    border-radius:16px;

    padding:20px;

    box-shadow:0 10px 30px rgba(0,0,0,.08);

    transition:.3s;

}

.timeline-content:hover{

    transform:translateY(-4px);

    box-shadow:0 15px 35px rgba(0,0,0,.15);

}


/* Timeline Container */
.status-timeline-wrapper {
    position: relative;
    padding: 10px 5px;
}

.status-timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

/* Gray Bar Line Connecting Icons */
.status-timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 30px;
    right: 30px;
    height: 3px;
    background-color: #e2e8f0;
    z-index: 1;
}

/* Individual Step Node */
.timeline-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.timeline-step .step-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1.1rem;
    transition: all 0.25s ease-in-out;
}

.timeline-step .step-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}

/* ACTIVE Step (Current Status) */
.timeline-step.active .step-icon {
    border-color: #2563eb;
    background-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
}

.timeline-step.active .step-label {
    color: #2563eb;
    font-weight: 700;
}

/* COMPLETED Steps (Passed Milestones) */
.timeline-step.completed .step-icon {
    border-color: #16a34a;
    background-color: #16a34a;
    color: #ffffff;
}

.timeline-step.completed .step-label {
    color: #16a34a;
}

  /* Custom Gradient Submit Button with #073e8d Theme */
  .btn-gradient {
    background: linear-gradient(135deg, #073e8d 0%, #0d52b5 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(7, 62, 141, 0.25);
    transition: all 0.2s ease-in-out;
  }

  .btn-gradient:hover {
    background: linear-gradient(135deg, #052c65 0%, #073e8d 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(7, 62, 141, 0.35);
  }

  .btn-gradient:active {
    transform: translateY(0);
  }
  
  .text-primary {
    --bs-text-opacity: 1;
    color: #073e8d !important;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #073e8d;
    --bs-btn-border-color: #073e8d;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #08306b;
    --bs-btn-hover-border-color: #0a58ca;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff; 
    --bs-btn-active-bg: #0a58ca;
    --bs-btn-active-border-color: #0a53be;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color
#fff
: #fff;
    --bs-btn-disabled-bg: #073e8d;
    --bs-btn-disabled-border-color: #073e8d;
}

/* Custom Theme Color Variables */
:root {
  --theme-navy: #073e8d;
  --theme-navy-hover: #052c65;
  --theme-navy-light: rgba(7, 62, 141, 0.08);
  --theme-navy-shadow: rgba(7, 62, 141, 0.25);
}

/* =========================================================
   1. FORM CONTROLS & DROPDOWNS (Inputs, Selects, Textareas)
   ========================================================= */

/* Default Border & Focus Highlight */
.form-control,
.form-select {
  border-color: #cbd5e1;
  color: #1e293b;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Focus state for inputs, dropdowns, and textareas */
.form-control:focus,
.form-select:focus {
  border-color: var(--theme-navy) !important;
  box-shadow: 0 0 0 0.25rem var(--theme-navy-shadow) !important;
  outline: 0;
}

/* Custom background icon color for select arrows (Bootstrap) */
.form-select:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23073e8d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Dropdown Menu Item Hover / Active States */
.dropdown-menu .dropdown-item:active,
.dropdown-menu .dropdown-item.active {
  background-color: var(--theme-navy) !important;
  color: #ffffff !important;
}

/* Custom Checkboxes and Radios */
.form-check-input:checked {
  background-color: var(--theme-navy) !important;
  border-color: var(--theme-navy) !important;
}

.form-check-input:focus {
  border-color: var(--theme-navy) !important;
  box-shadow: 0 0 0 0.2rem var(--theme-navy-shadow) !important;
}

/* =========================================================
   2. BUTTONS & UTILITIES
   ========================================================= */

.btn-navy {
  background-color: var(--theme-navy) !important;
  border-color: var(--theme-navy) !important;
  color: #ffffff !important;
}

.btn-navy:hover,
.btn-navy:focus {
  background-color: var(--theme-navy-hover) !important;
  border-color: var(--theme-navy-hover) !important;
  color: #ffffff !important;
}

.btn-outline-navy {
  color: var(--theme-navy) !important;
  border-color: var(--theme-navy) !important;
  background-color: transparent;
}

.btn-outline-navy:hover {
  background-color: var(--theme-navy) !important;
  color: #ffffff !important;
}


  .stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  }
  .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
  }
  .table-custom {
    vertical-align: middle;
    font-size: 0.85rem;
  }
  .table-custom th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    padding: 12px 10px;
  }
  .badge-spec {
    background: #eef2ff;
    color: #073e8d;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
  }
/* Professional Simple Vertical Timeline */
.timeline-vertical-wrapper {
  position: relative;
  padding: 10px 0 10px 15px;
  margin: 5px 0;
}

/* Vertical Connecting Line */
.timeline-vertical-wrapper::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 19px;
  width: 2px;
  background: #e2e8f0;
  z-index: 1;
}

.timeline-v-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.timeline-v-item:last-child {
  margin-bottom: 0;
}

/* Simple Dark Blue Dot Indicator */
.timeline-v-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0f172a; /* Dark Blue / Slate */
  z-index: 2;
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px #ffffff; /* Creates a clean gap over the line */
}

/* Minimalist Content Block */
.timeline-v-content {
  width: 100%;
}

.timeline-v-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a; /* Dark text instead of primary blue */
  margin-bottom: 3px;
}

.timeline-v-note {
  color: #475569;
  font-size: 0.85rem;
  margin-bottom: 6px;
  line-height: 1.4;
}

.timeline-v-meta {
  color: #94a3b8;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-outline-primary {
    --bs-btn-color: #073e8d;
    --bs-btn-border-color: #073e8d;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #073e8d;
    --bs-btn-hover-border-color: #073e8d;
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #073e8d;
    --bs-btn-active-border-color: #073e8d;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #073e8d;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #073e8d;
    --bs-gradient: none;
}

.note-scroll-box {
  max-height: 100px;
  max-width: 200px;
  overflow-y: auto;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.78rem;
  line-height: 1.3;
  color: #475569;
}

/* Optional custom scrollbar */
.note-scroll-box::-webkit-scrollbar {
  width: 4px;
}
.note-scroll-box::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}


/* Custom Sidebar Menu Styling */

/* Main Parent Link Styling */
.main-menu-link {
  color: #334155;
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 14px;
  transition: all 0.2s ease;
}

.main-menu-link:hover {
  background-color: #f1f5f9;
  color: #093c8a;
}

/* Active / Expanded Dark Parent Menu Header */
.main-menu-link.active, 
.main-menu-link[aria-expanded="true"] {
  background-color: #093c8a !important; /* Dark Blue Header */
  color: #ffffff !important;
}

/* Arrow Icon Rotation */
.arrow-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.main-menu-link[aria-expanded="true"] .arrow-icon {
  transform: rotate(180deg);
}

/* Submenu Container (Clean Indent) */
.submenu-container {
  padding-left: 10px;
  padding-top: 4px;
  padding-bottom: 4px;
}

/* Default Submenu Link */
.sub-menu-link {
  font-size: 0.85rem !important;
  font-weight: 500;
  color: #475569 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  margin-top: 3px;
  margin-bottom: 3px;
  background-color: transparent !important;
  transition: all 0.2s ease;
}

.sub-menu-link:hover {
  color: #093c8a !important;
  background-color: #f8fafc !important;
}

/* ACTIVE SUBMENU LINK: Soft Light Background with Dark Blue Text */
.sub-menu-link.active {
  background-color: #e6f0ff !important; /* Soft Light Blue Tint */
  color: #093c8a !important;            /* Dark Blue Text */
  font-weight: 700 !important;
  border-left: 3px solid #093c8a;        /* Accent bar on the left edge */
}

.sidebar-nav .nav-link.subactive {
    background: #eef2ff;
    color: #073e8d;
}