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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    min-height: 100vh;
}

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

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e3a8a;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s;
}

.btn:hover {
    background: #1e40af;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #219150;
}

.btn-warning {
    background: #f39c12;
}

.btn-warning:hover {
    background: #d68910;
}

/* Dashboard Styles */
.dashboard {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.dashboard-header {
    background: #0078BA;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    max-width: 100%;
    height: auto;
    max-height: 50px;
}

.dashboard-header h1 {
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.dashboard-nav {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.dashboard-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.dashboard-nav a {
    color: #333;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
    background: #1e3a8a;
    color: white;
}

.dashboard-content {
    padding: 30px;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

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

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

table tr:hover {
    background: #f8f9fa;
}

/* Alert Styles */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

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

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

/* Form Styles */
.form-header {
    margin-bottom: 30px;
}

.form-header h2 {
    color: #333;
    font-size: 24px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* File Upload Styles */
.file-upload {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-upload:hover {
    border-color: #667eea;
}

.file-upload input {
    display: none;
}

/* Label Print Styles */
.label-preview {
    width: 100mm;
    height: 30mm;
    border: 1px solid #ddd;
    padding: 5mm;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white;
}

.label-header {
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.label-sector {
    text-align: center;
    font-size: 12px;
    color: #666;
}

.label-barcode {
    text-align: center;
}

.label-barcode img {
    max-width: 100%;
    height: auto;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .dashboard-header,
    .dashboard-nav,
    .btn,
    .form-group {
        display: none;
    }
    
    .label-preview {
        border: none;
        margin: 0;
        page-break-after: always;
    }
}

/* Print Styles for Reports */
@media print {
    body {
        background: white;
    }
    
    .dashboard-header,
    .dashboard-nav,
    .btn,
    .form-group,
    .form-header {
        display: none;
    }
    
    .dashboard {
        box-shadow: none;
    }
    
    .dashboard-content {
        padding: 0;
    }
    
    .table-container {
        overflow: visible;
    }
    
    table {
        page-break-inside: auto;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .dashboard-nav ul {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .login-box {
        padding: 20px;
    }
}
