* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
}

a.link
{
	text-decoration: none;
}

/* Login Screen */
.login-screen 
{ 
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: rgb(44, 62, 80);
		 
		
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    color: #764ba2;
    margin-bottom: 30px;
}

.login-container h1.title
{
  display: flex;
  align-items: center;      /* vertically center image and text */
  gap: 15px;                /* space between the image and text */
  font-size: 1.5em;         /* adjust as you like */
}

.login-container h1.title > a 
{
  display: flex;
  align-items: center;
}

.login-container h1.title img 
{
  vertical-align: middle;   /* optional, extra safety */
  border-radius: 50%;       /* optional, if you want a round avatar */
	height: 64px;
}

#login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1em;
    transition: border 0.3s;
}

#login-form input:focus {
    outline: none;
    border-color: #667eea;
}

#login-form button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

#login-form button:hover {
    background: #764ba2;
}

.login-hint {
    text-align: center;
    color: #999;
    font-size: 0.9em;
    margin-top: 15px;
}

/* Admin Panel Layout */
.admin-panel {
    display: flex;
    min-height: 100vh;
}
 
/* Responsive Sidebar Width */
.sidebar 
{
    width: 20%; /* Changed from 250px */
    min-width: 200px; /* Prevent it from getting too narrow */
    max-width: 300px; /* Prevent it from getting too wide */
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.main-content 
{
    margin-left: 20%; /* Changed from 250px to match sidebar */
    flex: 1;
    padding: 20px;
}

.logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.logo h2 {
    font-size: 1.3em;
}

.logo h2.title
{
  display: flex;
  align-items: center;      /* vertically center image and text */
  gap: 25px;                /* space between the image and text */
  
}

.logo h2.title > a 
{
  display: flex;
  align-items: center;
}

.logo h2.title img 
{
  vertical-align: middle;   /* optional, extra safety */
  border-radius: 50%;       /* optional, if you want a round avatar */
	height: 32px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    background: rgba(255,255,255,0.1);
    border-left-color: #667eea;
}

.nav-item.logout {
    margin-top: 20px;
    color: #e74c3c;
}
 

.top-bar {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.top-bar h1 {
    color: #2c3e50;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3em;
    opacity: 0.8;
}

.stat-info h3 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 5px;
}

.stat-info p {
    color: #999;
}

/* Tables */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: #2c3e50;
}

.table-container {
    background: white;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

th {
    font-weight: 600;
    color: #2c3e50;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Buttons */
.btn-primary {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #764ba2;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-edit {
    background: #3498db;
    color: white;
    padding: 5px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 5px;
		min-width: 100px;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    padding: 5px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
		min-width: 100px;
}



.btn-view {
    background: #27ae60;
    color: white;
    padding: 5px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 5px;
		min-width: 100px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba( 0,0,0, 0.5 );
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
     
		--color-white-trans: rgba( 255,255,255, 0.85 );
		 
		background: var( --color-white-trans );
		 
    margin: 50px auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e1e8ed;
}

.close {
    font-size: 2em;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

#product-form, #order-details {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e8ed;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Recent Orders */
.recent-orders {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.recent-orders h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.order-item {
    padding: 15px;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-item:last-child {
    border-bottom: none;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e8ed;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

select.form-control {
    cursor: pointer;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #27ae60;
    color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateX(500px);
    transition: transform 0.3s;
    z-index: 2000;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #e74c3c;
}


/* Draggable Modal Styles */
  
.modal-header {
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

.modal-content {
    position: relative;
    touch-action: none;
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.modal-content.dragging {
    transition: none !important;
}

/* Make form elements and buttons inside modal not draggable */
.modal-content input,
.modal-content textarea,
.modal-content button,
.modal-content select,
.modal-content .close {
    cursor: auto;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.modal-content button,
.modal-content .close {
    cursor: pointer;
}

/* Visual feedback when dragging */
.modal-header:active,
.modal-content:active {
    cursor: grabbing;
}

.modal-header:active {
    background: rgba(102, 126, 234, 0.1);
}
 

/* Mobile responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 25%;
        min-width: 180px;
    }
    
    .main-content {
        margin-left: 25%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .admin-panel {
        flex-direction: column;
    }
  
    .modal-content {
        margin: 20px auto;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
    
    .modal-header::after {
        content: "⋮⋮";
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 1.5em;
        color: rgba(0,0,0,0.2);
        pointer-events: none;
    }		
}


