/* === GENERAL === */
body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background-color: #fafafa;
  color: #222;
}

/* === NAVBAR === */
.main-header.navbar {
  border-bottom: 1px solid #dee2e6;
  padding: 0.5rem 1rem;
  min-height: 57px;
}

.navbar-nav .nav-link {
  color: #495057;
  padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
  color: #F7941D;
}

/* === DROPDOWN === */
.dropdown-menu {
  min-width: 15rem;
  border: none;
  border-radius: 0 0 10px 10px;
  background-color: #ffffff;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.dropdown-menu > li > a {
  padding: 10px 15px;
  color: #222;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-menu > li > a:hover {
  background-color: #FFF4E6;
  border-left: 4px solid #F7941D;
  color: #000000;
}

.dropdown-item.active, 
.dropdown-item:active {
  background: linear-gradient(to right, #F7941D, #ffb24d);
  color: #fff;
  border-left: 4px solid #000000;
}

/* Dropdown submenu */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -6px;
  border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

.dropdown-submenu > a:after {
  content: "";
  float: right;
  border-width: 5px 0 5px 5px;
  border-style: solid;
  border-color: transparent;
  border-left-color: #ccc;
  margin-top: 5px;
  margin-right: -10px;
}

.dropdown-submenu:hover > a:after {
  border-left-color: #F7941D;
}

/* === CARD === */
.card {
  border-radius: 12px;
  transition: all 0.3s ease;
  background-color: #ffffff;
  border: 1px solid #eee;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(247, 148, 29, 0.3);
}

.card-header {
  font-weight: 700;
  border-bottom: 2px solid #F7941D;
  color: #000;
  background-color: #FFF4E6;
  border-radius: 12px 12px 0 0;
}

.card .btn {
  background-color: #F7941D;
  color: #fff;
  font-weight: bold;
  border: none;
  transition: 0.3s;
  border-radius: 6px;
}

.card .btn:hover {
  background-color: #e68310;
  transform: translateY(-1px);
}

.card .btn.active {
  background-color: #000000;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.btn-app:hover {
  box-shadow: 0 4px 10px rgba(247, 148, 29, 0.5);
  transform: translateY(-2px);
}

/* === TABLE === */
table {
  font-family: 'Inter', sans-serif;
  font-size: 9pt;
  border: 1px solid #ddd;
  border-collapse: collapse;
  width: 100%;
}

th, td {
  padding: 0.6em;
  border: 1px solid #ddd;
  vertical-align: middle;
}

th {
  text-transform: uppercase;
  text-align: center;
  font-size: 8pt;
  background-color: #F7941D;
  color: #fff;
}

/* === DATATABLE === */
.pagination a {
  border-radius: 6px;
  font-size: 0.813rem;
  margin: 0 1px;
  padding: 5px 10px;
  min-width: 36px;
  max-width: 50px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-item.active .page-link {
  background-color: #000000;
  color: white;
  border: 0.5px solid #F7941D;
}

/* Override AdminLTE pagination - FORCE SMALL SIZE */
.page-link,
.pagination .page-link,
.pagination-sm .page-link,
.pagination-lg .page-link,
nav[role="navigation"] .page-link {
  padding: 5px 10px !important;
  font-size: 0.813rem !important;
  line-height: 1.4 !important;
  min-width: 36px !important;
  max-width: 50px !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Smaller size for Previous/Next text buttons */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
  padding: 5px 12px !important;
  min-width: auto !important;
  max-width: none !important;
  font-size: 0.813rem !important;
}

/* SVG icons in Laravel pagination */
.pagination svg {
  width: 12px !important;
  height: 12px !important;
}

div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_filter,
div.dataTables_wrapper div.dataTables_length label {
  font-size: 14px;
  color: #222;
}

/* === FORM & BUTTON === */
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border: 2px solid #F7941D;
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.15);
  background-color: #fff;
}

button, input[type="submit"], input[type="reset"] {
  background-color: #F7941D;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  transition: all 0.2s ease;
}

button:hover, input[type="submit"]:hover {
  background-color: #d67a0f;
}

/* === HR STYLES === */
hr.dashed { border-top: 2px dashed #F7941D; }
hr.dotted { border-top: 2px dotted #F7941D; }
hr.solid { border-top: 2px solid #F7941D; }

hr.hr-text {
  position: relative;
  border: none;
  height: 2px;
  background: #F7941D;
}

hr.hr-text::before {
  content: attr(data-content);
  display: inline-block;
  background: #fff;
  font-weight: bold;
  font-size: 0.85rem;
  color: #000;
  padding: 0.2rem 2rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* === RESPONSIVE FIX === */
@media (max-width: 768px) {
  .navbar-nav > .nav-item:not(:first-child) > .nav-link::before {
    display: none;
  }
  .navbar-nav > .nav-item > .nav-link {
    padding-left: 0 !important;
  }
}

/* === USER DROPDOWN MENU === */
.user-dropdown .dropdown-menu {
    min-width: 280px;
    border-radius: 8px;
    border: none;
    padding: 0;
    margin-top: 8px;
}

.user-dropdown .dropdown-header {
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.user-dropdown .dropdown-header strong {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.user-dropdown .dropdown-header small {
    font-size: 12px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.95);
}

.user-dropdown .dropdown-item {
    padding: 12px 20px;
    font-size: 14px;
    transition: all 0.2s ease;
    color: #495057;
}

.user-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
    padding-left: 25px;
}

.user-dropdown .dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

.user-dropdown .dropdown-divider {
    margin: 0;
}

.user-dropdown .nav-link {
    display: flex;
    align-items: center;
}

.user-dropdown .nav-link i {
    font-size: 1.2rem;
}

/* Shadow for dropdown */
.shadow-sm {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Hover effects for dropdown items */
.user-dropdown .dropdown-item:active {
    background-color: #e9ecef;
}

.user-dropdown .dropdown-item:focus {
    background-color: #f8f9fa;
    outline: none;
}

/* === USER MENU DROPDOWN WITH BUTTONS === */
.user-dropdown-custom {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
}

.user-dropdown-custom .user-header {
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.user-dropdown-custom .user-header img {
    width: 80px;
    height: 80px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.user-dropdown-custom .user-header p {
    margin-bottom: 0;
    color: white;
}

.user-dropdown-custom .user-header strong {
    font-size: 16px;
    font-weight: 600;
}

.user-dropdown-custom .user-header small {
    font-size: 12px;
    opacity: 0.95;
}

.user-dropdown-custom .user-footer {
    padding: 15px;
    background-color: #f8f9fa;
}

.user-dropdown-custom .user-footer .btn {
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: none;
}

.user-dropdown-custom .user-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.user-dropdown-custom .user-footer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.user-dropdown-custom .user-footer .btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
}

.user-dropdown-custom .user-footer .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
}

.user-dropdown-custom .user-footer .btn i {
    font-size: 13px;
}

/* Hover effects */
.user-dropdown-custom .user-footer .btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.user-dropdown-custom .user-footer .btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #17a2b8 100%);
}

.user-dropdown-custom .user-footer .btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
}

/* Active state */
.user-dropdown-custom .user-footer .btn.active {
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}

/* === RESPONSIVE IMAGES === */
/* Make all brand logos responsive */
.brand-image {
    max-width: 100%;
    height: auto !important;
}

/* Specific sizing for brand logos in navbar */
.brand-link .brand-image {
    max-width: 33px;
    max-height: 33px;
    width: auto;
}

/* Responsive images general rule */
img {
    max-width: 100%;
    height: auto;
}

/* Avatar and user images */
.img-size-50,
.user-image {
    max-width: 50px;
    max-height: 50px;
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.img-circle {
    border-radius: 50%;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .brand-link .brand-image {
        max-width: 28px;
        max-height: 28px;
    }
    
    .brand-link .brand-text {
        font-size: 0.9rem;
    }
    
    /* Ensure main content images are responsive on mobile */
    .content img,
    .card img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    
    /* Reduce avatar size on mobile */
    .img-size-50,
    .user-image {
        max-width: 40px;
        max-height: 40px;
        width: 40px;
        height: 40px;
    }
}

/* === SIDEBAR RESPONSIVE === */
/* Sidebar styling */
.main-sidebar {
    background-color: #343a40;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
    background-color: #F7941D;
    color: #fff;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link:hover {
    background-color: #4b545c;
}

/* Mobile: Auto-collapse sidebar */
@media (max-width: 767px) {
    body.sidebar-open {
        overflow: hidden;
    }
    
    .main-sidebar {
        margin-left: -250px;
    }
    
    .sidebar-open .main-sidebar {
        margin-left: 0;
    }
    
    .content-wrapper,
    .main-footer {
        margin-left: 0 !important;
    }
}

/* Tablet Portrait: Show collapsed sidebar */
@media (min-width: 768px) and (max-width: 991px) {
    body:not(.sidebar-collapse) .content-wrapper,
    body:not(.sidebar-collapse) .main-footer {
        margin-left: 250px;
    }
    
    body.sidebar-collapse .content-wrapper,
    body.sidebar-collapse .main-footer {
        margin-left: 4.6rem;
    }
}

/* Desktop: Full sidebar */
@media (min-width: 992px) {
    body:not(.sidebar-collapse) .content-wrapper,
    body:not(.sidebar-collapse) .main-footer {
        margin-left: 250px;
    }
    
    body.sidebar-collapse .content-wrapper,
    body.sidebar-collapse .main-footer {
        margin-left: 4.6rem;
    }
}
