/* css/compomemts.css */
/* ===== BUTTONS ===== */
.btn {
	padding: 10px 20px;
	border: none;
	border-radius: var(--border-radius-sm);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all var(--transition-fast);
	text-decoration: none;
}

.btn-primary {
	background-color: var(--primary-color);
	color: white;
}

.btn-primary:hover {
	background-color: #1a252f;
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.btn-secondary {
	background-color: var(--bg-secondary);
	color: var(--text-primary);
	border: 1px solid var(--border-color);
}

.btn-secondary:hover {
	background-color: var(--bg-primary);
	border-color: var(--primary-color);
}

.btn-success {
	background-color: var(--success-color);
	color: white;
}

.btn-success:hover {
	background-color: #219653;
}

.btn-danger {
	background-color: var(--danger-color);
	color: white;
}

.btn-danger:hover {
	background-color: #c0392b;
}

.btn-warning {
	background-color: var(--warning-color);
	color: white;
}

.btn-warning:hover {
	background-color: #e67e22;
}

.btn-info {
	background-color: var(--info-color);
	color: white;
}

.btn-info:hover {
	background-color: #21618c;
}

.btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn-sm {
	padding: 6px 12px;
	font-size: 12px;
}

.btn-lg {
	padding: 14px 28px;
	font-size: 16px;
}

.btn-block {
	width: 100%;
}

.btn-link {
	background: none;
	color: var(--secondary-color);
	padding: 0;
}

.btn-link:hover {
	text-decoration: underline;
	background: none;
	transform: none;
	box-shadow: none;
}

/* ===== FORMS ===== */
.form-group {
	margin-bottom: var(--spacing-lg);
}

.form-label {
	display: block;
	margin-bottom: var(--spacing-xs);
	font-weight: 600;
	color: var(--text-primary);
	font-size: 14px;
}

.form-control {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-sm);
	font-size: 14px;
	transition: border-color var(--transition-fast);
	background-color: var(--bg-secondary);
	color: var(--text-primary);
}

.form-control:focus {
	outline: none;
	border-color: var(--secondary-color);
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control::placeholder {
	color: var(--text-secondary);
	opacity: 0.7;
}

.form-select {
	padding: 10px 14px;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-sm);
	font-size: 14px;
	background-color: var(--bg-secondary);
	color: var(--text-primary);
	cursor: pointer;
	min-width: 150px;
}

.form-select:focus {
	outline: none;
	border-color: var(--secondary-color);
}

.form-text {
	font-size: 12px;
	color: var(--text-secondary);
	margin-top: var(--spacing-xs);
}

.form-check {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	margin-bottom: var(--spacing-sm);
	cursor: pointer;
}

.form-check-input {
	width: 18px;
	height: 18px;
	accent-color: var(--secondary-color);
}

.form-check-label {
	font-size: 14px;
	user-select: none;
}

.form-inline {
	display: flex;
	gap: var(--spacing-sm);
	align-items: flex-end;
}

/* ===== MODALS ===== */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: var(--z-modal);
	opacity: 0;
	visibility: hidden;
	transition: all var(--transition-normal);
}

.modal.show {
	opacity: 1;
	visibility: visible;
}

.modal-dialog {
	background-color: var(--bg-card);
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
	width: 90%;
	max-width: 500px;
	max-height: 90vh;
	overflow: hidden;
	transform: translateY(-20px);
	transition: transform var(--transition-normal);
}

.modal.show .modal-dialog {
	transform: translateY(0);
}

.modal-header {
	padding: var(--spacing-lg);
	border-bottom: 1px solid var(--border-color);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--primary-color);
	margin: 0;
}

.modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: var(--text-secondary);
	cursor: pointer;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

.modal-close:hover {
	background-color: var(--bg-primary);
	color: var(--primary-color);
}

.modal-body {
	padding: var(--spacing-lg);
	max-height: 60vh;
	overflow-y: auto;
}

.modal-footer {
	padding: var(--spacing-lg);
	border-top: 1px solid var(--border-color);
	display: flex;
	justify-content: flex-end;
	gap: var(--spacing-sm);
}

/* ===== ALERTS ===== */
.alert {
	padding: var(--spacing-md) var(--spacing-lg);
	border-radius: var(--border-radius-sm);
	margin-bottom: var(--spacing-lg);
	border-left: 4px solid transparent;
	display: flex;
	align-items: flex-start;
	gap: var(--spacing-sm);
}

.alert-icon {
	font-size: 20px;
	flex-shrink: 0;
	margin-top: 2px;
}

.alert-content {
	flex: 1;
}

.alert-title {
	font-weight: 600;
	margin-bottom: var(--spacing-xs);
}

.alert-message {
	font-size: 14px;
	line-height: 1.5;
}

.alert-success {
	background-color: rgba(39, 174, 96, 0.1);
	border-left-color: var(--success-color);
	color: #155724;
}

.alert-success .alert-icon {
	color: var(--success-color);
}

.alert-warning {
	background-color: rgba(243, 156, 18, 0.1);
	border-left-color: var(--warning-color);
	color: #856404;
}

.alert-warning .alert-icon {
	color: var(--warning-color);
}

.alert-danger {
	background-color: rgba(231, 76, 60, 0.1);
	border-left-color: var(--danger-color);
	color: #721c24;
}

.alert-danger .alert-icon {
	color: var(--danger-color);
}

.alert-info {
	background-color: rgba(52, 152, 219, 0.1);
	border-left-color: var(--secondary-color);
	color: #0c5460;
}

.alert-info .alert-icon {
	color: var(--secondary-color);
}

/* ===== BADGES ===== */
.badge {
	display: inline-block;
	padding: 4px 8px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
	vertical-align: baseline;
	border-radius: 10px;
}

.badge-primary {
	background-color: var(--primary-color);
	color: white;
}

.badge-secondary {
	background-color: var(--text-secondary);
	color: white;
}

.badge-success {
	background-color: var(--success-color);
	color: white;
}

.badge-warning {
	background-color: var(--warning-color);
	color: white;
}

.badge-danger {
	background-color: var(--danger-color);
	color: white;
}

.badge-info {
	background-color: var(--info-color);
	color: white;
}

.badge-pill {
	border-radius: 50px;
	padding-left: 10px;
	padding-right: 10px;
}

/* ===== LOADERS ===== */
.loader {
	display: inline-block;
	width: 30px;
	height: 30px;
	border: 3px solid var(--border-color);
	border-top-color: var(--secondary-color);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

.loader-sm {
	width: 20px;
	height: 20px;
	border-width: 2px;
}

.loader-lg {
	width: 50px;
	height: 50px;
	border-width: 4px;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

.loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
}

/* ===== CARD VARIANTS ===== */
.card-hover {
	transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card-hover:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

.card-border {
	border: 1px solid var(--border-color);
}

.card-shadow {
	box-shadow: var(--shadow-md);
}

/* ===== DATA TABLE ===== */
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
  background-color: transparent;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
}

.table tbody + tbody {
  border-top: 2px solid #dee2e6;
}

.table-sm th,
.table-sm td {
  padding: 0.3rem;
}

.table-bordered {
  border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid #dee2e6;
}

.table-bordered thead th,
.table-bordered thead td {
  border-bottom-width: 2px;
}

.table-borderless th,
.table-borderless td,
.table-borderless thead th,
.table-borderless tbody + tbody {
  border: 0;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

.table-hover tbody tr:hover {
  color: #212529;
  background-color: rgba(0, 0, 0, 0.075);
}

.table-primary,
.table-primary > th,
.table-primary > td {
  background-color: #b8daff;
}

.table-primary th,
.table-primary td,
.table-primary thead th,
.table-primary tbody + tbody {
  border-color: #7abaff;
}

.table-hover .table-primary:hover {
  background-color: #9fcdff;
}

.table-hover .table-primary:hover > td,
.table-hover .table-primary:hover > th {
  background-color: #9fcdff;
}

.table-secondary,
.table-secondary > th,
.table-secondary > td {
  background-color: #d6d8db;
}

.table-secondary th,
.table-secondary td,
.table-secondary thead th,
.table-secondary tbody + tbody {
  border-color: #b3b7bb;
}

.table-hover .table-secondary:hover {
  background-color: #c8cbcf;
}

.table-hover .table-secondary:hover > td,
.table-hover .table-secondary:hover > th {
  background-color: #c8cbcf;
}

.table-success,
.table-success > th,
.table-success > td {
  background-color: #c3e6cb;
}

.table-success th,
.table-success td,
.table-success thead th,
.table-success tbody + tbody {
  border-color: #8fd19e;
}

.table-hover .table-success:hover {
  background-color: #b1dfbb;
}

.table-hover .table-success:hover > td,
.table-hover .table-success:hover > th {
  background-color: #b1dfbb;
}

.table-info,
.table-info > th,
.table-info > td {
  background-color: #bee5eb;
}

.table-info th,
.table-info td,
.table-info thead th,
.table-info tbody + tbody {
  border-color: #86cfda;
}

.table-hover .table-info:hover {
  background-color: #abdde5;
}

.table-hover .table-info:hover > td,
.table-hover .table-info:hover > th {
  background-color: #abdde5;
}

.table-warning,
.table-warning > th,
.table-warning > td {
  background-color: #ffeeba;
}

.table-warning th,
.table-warning td,
.table-warning thead th,
.table-warning tbody + tbody {
  border-color: #ffdf7e;
}

.table-hover .table-warning:hover {
  background-color: #ffe8a1;
}

.table-hover .table-warning:hover > td,
.table-hover .table-warning:hover > th {
  background-color: #ffe8a1;
}

.table-danger,
.table-danger > th,
.table-danger > td {
  background-color: #f5c6cb;
}

.table-danger th,
.table-danger td,
.table-danger thead th,
.table-danger tbody + tbody {
  border-color: #ed969e;
}

.table-hover .table-danger:hover {
  background-color: #f1b0b7;
}

.table-hover .table-danger:hover > td,
.table-hover .table-danger:hover > th {
  background-color: #f1b0b7;
}

.table-light,
.table-light > th,
.table-light > td {
  background-color: #fdfdfe;
}

.table-light th,
.table-light td,
.table-light thead th,
.table-light tbody + tbody {
  border-color: #fbfcfc;
}

.table-hover .table-light:hover {
  background-color: #ececf6;
}

.table-hover .table-light:hover > td,
.table-hover .table-light:hover > th {
  background-color: #ececf6;
}

.table-dark,
.table-dark > th,
.table-dark > td {
  background-color: #c6c8ca;
}

.table-dark th,
.table-dark td,
.table-dark thead th,
.table-dark tbody + tbody {
  border-color: #95999c;
}

.table-hover .table-dark:hover {
  background-color: #b9bbbe;
}

.table-hover .table-dark:hover > td,
.table-hover .table-dark:hover > th {
  background-color: #b9bbbe;
}

.table-active,
.table-active > th,
.table-active > td {
  background-color: rgba(0, 0, 0, 0.075);
}

.table-hover .table-active:hover {
  background-color: rgba(0, 0, 0, 0.075);
}

.table-hover .table-active:hover > td,
.table-hover .table-active:hover > th {
  background-color: rgba(0, 0, 0, 0.075);
}

.table .thead-dark th {
  color: #fff;
  background-color: #212529;
  border-color: #383f45;
}

.table .thead-light th {
  color: #495057;
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.table-dark {
  color: #fff;
  background-color: #212529;
}

.table-dark th,
.table-dark td,
.table-dark thead th {
  border-color: #383f45;
}

.table-dark.table-bordered {
  border: 0;
}

.table-dark.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

.table-dark.table-hover tbody tr:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.075);
}

@media (max-width: 575.98px) {
  .table-responsive-sm {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-responsive-sm > .table-bordered {
    border: 0;
  }
}

@media (max-width: 767.98px) {
  .table-responsive-md {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-responsive-md > .table-bordered {
    border: 0;
  }
}

@media (max-width: 991.98px) {
  .table-responsive-lg {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-responsive-lg > .table-bordered {
    border: 0;
  }
}

@media (max-width: 1199.98px) {
  .table-responsive-xl {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-responsive-xl > .table-bordered {
    border: 0;
  }
}

.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > .table-bordered {
  border: 0;
}

/* ===== DATA TABLE ENHANCEMENTS ===== */
.table-striped tbody tr:nth-child(odd) {
	background-color: var(--bg-primary);
}

.table-hover tbody tr:hover {
	background-color: rgba(52, 152, 219, 0.05);
}

.table-compact th,
.table-compact td {
	padding: 8px 12px;
	font-size: 13px;
}

.table-bordered {
	border: 1px solid var(--border-color);
}

.table-bordered th,
.table-bordered td {
	border: 1px solid var(--border-color);
}

/* ===== GRID SYSTEM ===== */
.row {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -10px;
}

.col {
	flex: 1;
	padding: 0 10px;
}

.col-1 { flex: 0 0 8.33333%; max-width: 8.33333%; }
.col-2 { flex: 0 0 16.66667%; max-width: 16.66667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.33333%; max-width: 33.33333%; }
.col-5 { flex: 0 0 41.66667%; max-width: 41.66667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.33333%; max-width: 58.33333%; }
.col-8 { flex: 0 0 66.66667%; max-width: 66.66667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.33333%; max-width: 83.33333%; }
.col-11 { flex: 0 0 91.66667%; max-width: 91.66667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ===== TOOLTIPS ===== */
.tooltip {
	position: relative;
	display: inline-block;
}

.tooltip .tooltip-text {
	visibility: hidden;
	background-color: var(--primary-color);
	color: white;
	text-align: center;
	padding: 6px 12px;
	border-radius: var(--border-radius-sm);
	font-size: 12px;
	position: absolute;
	z-index: 1;
	bottom: 125%;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	opacity: 0;
	transition: opacity var(--transition-fast);
}

.tooltip .tooltip-text::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: var(--primary-color) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
	visibility: visible;
	opacity: 1;
}

/* ===== PAGINATION ===== */
.pagination {
	display: flex;
	gap: 4px;
	list-style: none;
	padding: 0;
	margin: var(--spacing-lg) 0;
}

.page-item {
	display: inline-block;
}

.page-link {
	display: block;
	padding: 8px 12px;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-sm);
	color: var(--text-primary);
	text-decoration: none;
	font-size: 14px;
	transition: all var(--transition-fast);
}

.page-link:hover {
	background-color: var(--bg-primary);
	border-color: var(--primary-color);
}

.page-item.active .page-link {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
	color: white;
}

.page-item.disabled .page-link {
	color: var(--text-secondary);
	pointer-events: none;
	background-color: var(--bg-primary);
}

/* ===== TABS (Alternative) ===== */
.nav-tabs {
	display: flex;
	border-bottom: 1px solid var(--border-color);
	margin-bottom: var(--spacing-lg);
}

.nav-tab {
	padding: 12px 24px;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-secondary);
	cursor: pointer;
	transition: all var(--transition-fast);
}

.nav-tab:hover {
	color: var(--primary-color);
}

.nav-tab.active {
	color: var(--primary-color);
	border-bottom-color: var(--accent-color);
	background-color: rgba(26, 188, 156, 0.05);
}

.tab-pane {
	display: none;
}

.tab-pane.active {
	display: block;
}

/* ===== PROGRESS BARS ===== */
.progress {
	height: 8px;
	background-color: var(--bg-primary);
	border-radius: 4px;
	overflow: hidden;
	margin: var(--spacing-sm) 0;
}

.progress-bar {
	height: 100%;
	background-color: var(--secondary-color);
	border-radius: 4px;
	transition: width 0.3s ease;
}

.progress-bar.success {
	background-color: var(--success-color);
}

.progress-bar.warning {
	background-color: var(--warning-color);
}

.progress-bar.danger {
	background-color: var(--danger-color);
}

.progress-bar.info {
	background-color: var(--info-color);
}

/* ===== ICON COLORS ===== */
.icon-primary { color: var(--primary-color); }
.icon-secondary { color: var(--secondary-color); }
.icon-success { color: var(--success-color); }
.icon-warning { color: var(--warning-color); }
.icon-danger { color: var(--danger-color); }
.icon-info { color: var(--info-color); }
.icon-accent { color: var(--accent-color); }
.icon-light { color: var(--text-light); }
.icon-dark { color: var(--text-dark); }

/* ===== UTILITY CLASSES EXTENDED ===== */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }

.justify-content-start { justify-content: flex-start; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

.flex-1 { flex: 1; }
.flex-auto { flex: auto; }
.flex-none { flex: none; }

.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.gap-3 { gap: var(--spacing-lg); }
.gap-4 { gap: var(--spacing-xl); }

.text-truncate {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

.font-weight-normal { font-weight: 400; }
.font-weight-medium { font-weight: 500; }
.font-weight-semibold { font-weight: 600; }
.font-weight-bold { font-weight: 700; }

.font-size-xs { font-size: 12px; }
.font-size-sm { font-size: 14px; }
.font-size-md { font-size: 16px; }
.font-size-lg { font-size: 18px; }
.font-size-xl { font-size: 20px; }

.border { border: 1px solid var(--border-color); }
.border-top { border-top: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-left { border-left: 1px solid var(--border-color); }
.border-right { border-right: 1px solid var(--border-color); }

.border-0 { border: none !important; }
.border-top-0 { border-top: none !important; }
.border-bottom-0 { border-bottom: none !important; }
.border-left-0 { border-left: none !important; }
.border-right-0 { border-right: none !important; }

.rounded { border-radius: var(--border-radius); }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-circle { border-radius: 50%; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-none { box-shadow: none !important; }

.w-25 { width: 25%; }
.w-50 { width: 50%; }
.w-75 { width: 75%; }
.w-100 { width: 100%; }
.w-auto { width: auto; }

.h-25 { height: 25%; }
.h-50 { height: 50%; }
.h-75 { height: 75%; }
.h-100 { height: 100%; }
.h-auto { height: auto; }

.mw-100 { max-width: 100%; }
.mh-100 { max-height: 100%; }

.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }

.position-static { position: static; }
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

/* ===== PRINT STYLES ===== */
@media print {
	.top-header,
	.sidebar,
	.tab-bar,
	.status-bar,
	.notification-panel,
	.content-actions,
	.btn {
		display: none !important;
	}
	
	.main-container {
		display: block;
	}
	
	.content-area {
		overflow: visible;
	}
	
	.tab-content {
		position: static;
		display: block !important;
		height: auto;
		overflow: visible;
	}
	
	body {
		background: white;
		color: black;
		font-size: 12pt;
	}
	
	.card {
		border: 1px solid #ddd;
		box-shadow: none;
	}
}