* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html, body {
height: 100%;
}

body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
background-color: #f4f4f4;
display: grid;
grid-template-rows: auto 1fr auto;
min-height: 100vh;
}

.navbar {
grid-row: 1;
background: #2c3e50;
color: white;
padding: 1rem 0;
}

.nav-container {
max-width: 1200px;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
padding: 0 20px;
}

.nav-brand {
font-size: 1.5rem;
}

.nav-links {
display: flex;
gap: 15px;
align-items: center;
flex-wrap: wrap;
justify-content: center;
}

.nav-links a {
color: white;
text-decoration: none;
padding: 8px 16px;
border-radius: 4px;
transition: background 0.3s;
white-space: nowrap;
font-size: 14px;
}

.nav-links a:hover {
background: #34495e;
}

.content-wrapper {
grid-row: 2;
position: relative;
flex: 1 0 auto;
padding-bottom: 20px;
}

.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}

.footer {
grid-row: 3;
background: #2c3e50;
color: white;
text-align: center;
padding: 20px 0;
width: 100%;
}

.footer p {
margin: 0;
opacity: 0.8;
}

.btn {
display: inline-block;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: center;
text-decoration: none;
vertical-align: middle;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
background-color: transparent;
border: 1px solid transparent;
padding: 0.375rem 0.75rem;
font-size: 1rem;
border-radius: 0.25rem;
transition: all 0.3s;
}

.btn:hover {
color: #212529;
}

.btn:focus {
outline: 0;
box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
background: #0d6efd;
color: white;
border-color: #0d6efd;
}

.btn-primary:hover {
background: #0b5ed7;
border-color: #0a58ca;
color: white;
}

.btn-secondary {
background: #6c757d;
color: white;
border-color: #6c757d;
}

.btn-secondary:hover {
background: #5c636a;
border-color: #565e64;
color: white;
}

.btn-success {
color: #fff;
background-color: #198754;
border-color: #198754;
}

.btn-success:hover {
color: #fff;
background-color: #157347;
border-color: #146c43;
}

.btn-warning {
color: #000;
background-color: #ffc107;
border-color: #ffc107;
}

.btn-warning:hover {
color: #000;
background-color: #ffca2c;
border-color: #ffc720;
}

.btn-danger {
color: #fff;
background-color: #dc3545;
border-color: #dc3545;
}

.btn-danger:hover {
color: #fff;
background-color: #bb2d3b;
border-color: #b02a37;
}

.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
border-radius: 0.2rem;
}

.btn-group {
position: relative;
display: inline-flex;
vertical-align: middle;
}

.btn-group > .btn {
position: relative;
flex: 1 1 auto;
}

.btn-group > .btn:not(:first-child) {
margin-left: -1px;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}

.btn-group > .btn:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}

.form-group {
margin-bottom: 20px;
}

label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}

.form-label {
margin-bottom: 0.5rem;
font-weight: 500;
}

input, select, textarea {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 14px;
}

.form-control {
display: block;
width: 100%;
padding: 0.375rem 0.75rem;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select {
display: block;
width: 100%;
padding: 0.375rem 2.25rem 0.375rem 0.75rem;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
background-color: #fff;
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='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right 0.75rem center;
background-size: 16px 12px;
border: 1px solid #ced4da;
border-radius: 0.25rem;
appearance: none;
}

.form-help {
color: #666;
font-size: 0.9em;
margin-top: 5px;
display: block;
}

.form-text {
margin-top: 0.25rem;
font-size: 0.875em;
color: #6c757d;
}

select:focus {
outline: none;
border-color: #3498db;
box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
background: white;
border-radius: 5px;
overflow: hidden;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.table {
width: 100%;
margin-bottom: 1rem;
color: #212529;
border-collapse: collapse;
}

.table-striped tbody tr:nth-of-type(odd) {
background-color: rgba(0, 0, 0, 0.05);
}

.table-responsive {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}

th, td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #ddd;
}

th {
background: #34495e;
color: white;
}

tr:hover {
background: #f5f5f5;
}

.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin: 30px 0;
}

.stat-card {
background: white;
padding: 30px;
text-align: center;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-card h3 {
font-size: 2.5rem;
color: #3498db;
margin-bottom: 10px;
}

.quick-actions {
margin: 30px 0;
display: flex;
gap: 15px;
flex-wrap: wrap;
}

.flash-messages {
margin-bottom: 20px;
}

.flash-message, .alert {
padding: 15px;
border-radius: 5px;
margin-bottom: 10px;
}

.alert {
position: relative;
padding: 1rem 1rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}

.alert-success, .flash-message {
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}

.alert-warning {
background: #fff3cd;
color: #856404;
border: 1px solid #ffeaa7;
}

.alert-danger {
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}

.alert-info {
color: #055160;
background-color: #cff4fc;
border-color: #b6effb;
}

.login-container {
max-width: 400px;
margin: 50px auto;
background: white;
padding: 40px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-form {
margin-bottom: 30px;
}

.demo-info {
background: #f8f9fa;
padding: 15px;
border-radius: 5px;
font-size: 14px;
}

.demo-info code {
background: #e9ecef;
padding: 2px 5px;
border-radius: 3px;
}

.page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
}

.status-badge {
display: inline-block;
padding: 3px 8px;
border-radius: 12px;
font-size: 0.8em;
font-weight: bold;
}

.status-active {
background: #2ecc71;
color: white;
}

.status-inactive {
background: #95a5a6;
color: white;
}

.badge {
display: inline-block;
padding: 0.35em 0.65em;
font-size: 0.75em;
font-weight: 700;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25rem;
}

.bg-success {
background-color: #198754 !important;
}

.bg-secondary {
background-color: #6c757d !important;
}

.bg-warning {
background-color: #ffc107 !important;
color: #000 !important;
}

.calendar {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 15px;
margin-bottom: 30px;
}

.calendar-day {
background: white;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 15px;
transition: all 0.2s ease;
}

.calendar-day:hover {
border-color: #007bff;
box-shadow: 0 2px 8px rgba(0,123,255,0.1);
}

.calendar-day.today {
border-color: #28a745;
background: #f8fff9;
}

.calendar-day.working-day {
border-left: 4px solid #28a745;
}

.calendar-day.day-off {
border-left: 4px solid #dc3545;
}

.day-header {
margin-bottom: 10px;
text-align: center;
}

.day-date {
font-size: 18px;
font-weight: 600;
color: #333;
margin-bottom: 4px;
}

.day-weekday {
font-size: 12px;
color: #666;
text-transform: uppercase;
}

.day-schedule {
margin-bottom: 12px;
text-align: center;
}

.schedule-time {
font-size: 13px;
color: #28a745;
background: #f8fff9;
padding: 4px 8px;
border-radius: 4px;
display: inline-block;
}

.day-off-label {
font-size: 13px;
color: #dc3545;
background: #fff5f5;
padding: 4px 8px;
border-radius: 4px;
display: inline-block;
}

.edit-btn {
display: block;
width: 100%;
padding: 6px 12px;
background: #f8f9fa;
border: 1px solid #e0e0e0;
border-radius: 4px;
color: #666;
text-decoration: none;
text-align: center;
font-size: 12px;
transition: all 0.2s ease;
}

.edit-btn:hover {
background: #007bff;
color: white;
border-color: #007bff;
}

.form-container {
max-width: 500px;
margin: 0 auto;
background: white;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 30px;
}

.date-info {
text-align: center;
margin-bottom: 30px;
padding: 20px;
background: #f8f9fa;
border-radius: 6px;
}

.date-display {
font-size: 18px;
font-weight: 600;
color: #333;
margin-bottom: 5px;
}

.weekday-display {
font-size: 14px;
color: #666;
}

.schedule-form {
margin-top: 20px;
}

.checkbox-container {
display: flex;
align-items: center;
cursor: pointer;
font-size: 14px;
color: #333;
}

.checkbox-container input[type="checkbox"] {
margin-right: 10px;
}

.time-inputs {
margin-top: 15px;
padding-left: 20px;
border-left: 2px solid #e0e0e0;
}

.time-inputs .form-group {
margin-bottom: 15px;
}

.time-inputs label {
display: block;
margin-bottom: 5px;
font-size: 13px;
color: #666;
}

.time-input {
width: 100%;
padding: 8px 12px;
border: 1px solid #e0e0e0;
border-radius: 4px;
font-size: 14px;
}

.time-input:focus {
outline: none;
border-color: #007bff;
}

.form-actions {
display: flex;
gap: 10px;
justify-content: center;
margin-top: 30px;
}

.slot-status {
font-size: 0.8em;
color: #27ae60;
margin-top: 5px;
font-weight: 500;
}

:root {
--primary: #3498db;
--primary-dark: #2980b9;
--secondary: #f8f9fa;
--success: #27ae60;
--danger: #e74c3c;
--text: #2c3e50;
--text-light: #666;
--border: #e0e0e0;
--shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.discount-management-page {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
}

.card {
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
border: 1px solid rgba(0, 0, 0, 0.125);
border-radius: 0.25rem;
}

.card-body {
flex: 1 1 auto;
padding: 1rem 1rem;
}

.card-header {
padding: 0.5rem 1rem;
margin-bottom: 0;
background-color: rgba(0, 0, 0, 0.03);
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header:first-child {
border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
}

.fas {
font-family: "Font Awesome 6 Free";
font-weight: 900;
}

.text-end {
text-align: right !important;
}

.text-center {
text-align: center !important;
}

.d-inline {
display: inline !important;
}

.d-flex {
display: flex !important;
}

.d-md-flex {
display: flex !important;
}

.justify-content-md-end {
justify-content: flex-end !important;
}

.d-grid {
display: grid !important;
}

.me-md-2 {
margin-right: 0.5rem !important;
}

.mb-0 {
margin-bottom: 0 !important;
}

.mb-3 {
margin-bottom: 1rem !important;
}

.py-4 {
padding-top: 1.5rem !important;
padding-bottom: 1.5rem !important;
}

.gap-2 {
gap: 0.5rem !important;
}

.row {
display: flex;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
}

.col-12 {
flex: 0 0 100%;
max-width: 100%;
}

.col-md-6 {
flex: 0 0 50%;
max-width: 50%;
}

.text-muted {
color: #6c757d !important;
}

@media (max-width: 768px) {
.nav-container {
flex-direction: column;
text-align: center;
}
.nav-links {
margin-top: 15px;
gap: 8px;
}
.nav-links a {
margin: 0 5px;
padding: 5px 10px;
font-size: 12px;
}
.page-header {
flex-direction: column;
gap: 15px;
align-items: flex-start;
}
.stats-grid {
grid-template-columns: 1fr;
}
table {
font-size: 14px;
}
th, td {
padding: 8px 10px;
}
.quick-actions {
flex-direction: column;
}
.container {
padding: 15px;
}
.footer {
padding: 15px 0;
}
.calendar {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 10px;
}
.form-container {
padding: 20px;
margin: 0 10px;
}
.form-actions {
flex-direction: column;
}
.btn {
width: 100%;
}
.discount-management-page {
padding: 16px;
}
.btn-group {
display: flex;
flex-direction: column;
gap: 5px;
}
.btn-group .btn {
margin-left: 0 !important;
border-radius: 0.25rem !important;
}
.table-responsive {
font-size: 14px;
}
.btn-sm {
padding: 0.2rem 0.4rem;
font-size: 0.8rem;
}
.col-md-6 {
flex: 0 0 100%;
max-width: 100%;
}
}

@media (max-width: 480px) {
.nav-links {
flex-direction: column;
gap: 5px;
}
.nav-links a {
width: 100%;
text-align: center;
padding: 8px 10px;
}
}
