﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

a.navbar-brand {
  white-space: normal;
  text-align: center;
  word-break: break-all;
}

/* Provide sufficient contrast against white background */
a {
  color: #0366d6;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.border-top {
  border-top: 1px solid #e5e5e5;
}
.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}

body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

/* ================================================================
   ERP Navigation Styles (Bidirectional - RTL + LTR)
   ================================================================ */

/* ---------- Main Navbar ---------- */
.erp-navbar {
    background: linear-gradient(160deg, #1e3a5f 0%, #2b5fa8 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    padding: 0.3rem 0.75rem;
    margin-bottom: 1rem;
}
.erp-navbar .navbar-brand img { height: 42px; width: auto; }
.erp-navbar .navbar-nav .nav-link,
.erp-navbar .navbar-nav .btn-link {
    color: rgba(255,255,255,0.82) !important;
    padding: 0.45rem 0.9rem !important;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    font-size: 0.74rem;
    gap: 3px;
    margin: 0 2px;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}
.erp-navbar .navbar-nav .nav-link i { font-size: 1.3rem; line-height: 1; }
.erp-navbar .navbar-nav .nav-link:hover,
.erp-navbar .navbar-nav .nav-link:focus,
.erp-navbar .navbar-nav .btn-link:hover {
    background-color: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}
.erp-navbar .navbar-toggler { border-color: rgba(255,255,255,0.35); }
.erp-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
/* Language switch buttons in navbar */
.erp-navbar .lang-btn {
    color: rgba(255,255,255,0.7) !important;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem !important;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin: 0 2px;
    transition: all 0.2s;
}
.erp-navbar .lang-btn:hover { background: rgba(255,255,255,0.15); color:#fff !important; }

/* ---------- ERP Sidebar ---------- */
.erp-sidebar {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.09);
    overflow: hidden;
    position: sticky;
    top: 10px;
}
.erp-sidebar .sidebar-header {
    background: linear-gradient(135deg, #1e3a5f, #2b5fa8);
    color: #fff;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.erp-sidebar .sidebar-header i { font-size: 1.15rem; }
.erp-sidebar .sidebar-nav { padding: 0.35rem 0; }
.erp-sidebar .sidebar-link {
    color: #495057;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.9rem;
    transition: all 0.18s;
    border-inline-start: 3px solid transparent;   /* RTL=right, LTR=left */
    text-decoration: none;
    background: none;
}
.erp-sidebar .sidebar-link i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    color: #6c757d;
    flex-shrink: 0;
}
.erp-sidebar .sidebar-link:hover {
    background-color: #eef5ff;
    color: #1e3a5f;
    border-inline-start-color: #2b5fa8;
}
.erp-sidebar .sidebar-link:hover i { color: #2b5fa8; }
.erp-sidebar .sidebar-link.active-item {
    background-color: #deeaf8;
    color: #1e3a5f;
    font-weight: 600;
    border-inline-start-color: #1e3a5f;
}
.erp-sidebar .sidebar-link.active-item i { color: #1e3a5f; }
.erp-content { min-height: 60vh; }

/* ================================================================
   ERP Common Page Styles
   ================================================================ */
.erp-page { }
.erp-section-title {
    color: #1e3a5f;
    font-size: 1.05rem;
    font-weight: 600;
    padding-inline-start: 0.75rem;
    border-inline-start: 4px solid #2b5fa8;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}
/* ERP Themed Table */
.table-erp { }
.table-erp thead th {
    background-color: #2b5fa8;
    color: #fff;
    font-weight: 500;
    border-color: #2455a0;
    white-space: nowrap;
    vertical-align: middle;
}
.table-erp tbody tr:hover { background-color: #eef5ff; }
.table-erp td, .table-erp th { vertical-align: middle; }
/* ERP Form Card */
.erp-form-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
/* RTL Modal Header Fix */
.modal-header { flex-direction: row-reverse; }
.modal-header .close, .modal-header button.close { float: none !important; margin: 0 !important; }
.modal-header h1.float-left, .modal-header h2.float-left,
.modal-header h3.float-left, .modal-header h5.float-left,
.modal-header h6.float-left, .modal-header label.float-left {
    float: none !important; flex: 1; font-size: 1rem; margin: 0;
}
/* Total Summary Cards */
.total-summary-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.1rem 1.25rem; border-radius: 12px; cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.15s, box-shadow 0.15s;
    color: #fff; user-select: none;
}
.total-summary-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.18); }
.ts-icon { font-size: 1.7rem; width: 52px; height: 52px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ts-body { flex: 1; }
.ts-label { font-size: 0.82rem; font-weight: 500; opacity: 0.9; }
.ts-value { font-size: 1.25rem; font-weight: 700; }
.ts-green  { background: linear-gradient(135deg, #1aaa55, #28c76f); }
.ts-red    { background: linear-gradient(135deg, #e53935, #c62828); }
.ts-orange { background: linear-gradient(135deg, #f57c00, #ef6c00); }
.ts-blue   { background: linear-gradient(135deg, #2b5fa8, #1e3a5f); }
.ts-gray   { background: linear-gradient(135deg, #546e7a, #37474f); }
.ts-purple { background: linear-gradient(135deg, #7b1fa2, #6a1b9a); }
.ts-teal   { background: linear-gradient(135deg, #00838f, #006064); }
