/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.logo h3 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 25px;
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.welcome {
    color: #ecf0f1;
    font-size: 0.9rem;
}

.role {
    background: #e74c3c;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 5px;
}

.logout-btn {
    background: #e74c3c !important;
    color: white !important;
    font-weight: bold !important;
}

.logout-btn:hover {
    background: #c0392b !important;
    transform: translateY(-2px) !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Login Page Styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2rem;
}

.login-header p {
    color: #7f8c8d;
    font-size: 1rem;
}

.login-form .form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    margin-bottom: 20px;
}

.login-form .form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.login-footer {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

.login-footer p {
    margin-bottom: 10px;
    font-weight: bold;
    color: #2c3e50;
}

.login-footer ul {
    list-style: none;
    padding: 0;
}

.login-footer li {
    margin-bottom: 5px;
    color: #7f8c8d;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.card p {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

/* Section Styles */
.section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.full-width {
    flex: 100% !important;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-small {
    padding: 8px 15px;
    font-size: 12px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

th {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

.production-table th {
    text-align: center;
}

.production-table td {
    text-align: center;
}

.total-row {
    background: #2c3e50 !important;
    color: white;
    font-weight: bold;
}

.total-row td {
    border-top: 2px solid #3498db;
}

/* Badge Styles */
.role-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.role-admin {
    background: #e74c3c;
    color: white;
}

.role-production {
    background: #3498db;
    color: white;
}

.role-testing {
    background: #27ae60;
    color: white;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.badge-production {
    background: #3498db;
    color: white;
}

.badge-inventory {
    background: #f39c12;
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 400px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s;
}

.close:hover {
    color: #e74c3c;
}

/* Filter Form Styles */
.filter-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-form .form-row {
    align-items: end;
}

/* File Upload Styles */
.file-item {
    margin: 15px 0;
    padding: 15px;
    background: white;
    border: 2px dashed #ecf0f1;
    border-radius: 8px;
    text-align: center;
}

.file-item img,
.file-item video {
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Alert Styles */
.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
}

.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #e74c3c;
}

/* Footer Styles */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    
    .header nav {
        flex-direction: column;
        padding: 10px;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        margin-top: 15px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 10px 0;
    }
    
    .hamburger {
        display: flex;
        position: absolute;
        right: 20px;
        top: 15px;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        min-width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 20px;
    }
    
    .login-container {
        margin: 50px auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 15px;
    }
    
    .card p {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 15px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 12px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.p-10 { padding: 10px; }
.p-20 { padding: 20px; }

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .header, .footer, .btn {
        display: none;
    }
    
    .container {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
    
    table {
        box-shadow: none;
    }
}

.approval-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.approval-pending {
    background: #f39c12;
    color: white;
}

.approval-approved {
    background: #27ae60;
    color: white;
}

.approval-rejected {
    background: #e74c3c;
    color: white;
}

.print-disabled, .btn-disabled {
    background: #95a5a6 !important;
    color: white !important;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: not-allowed;
    opacity: 0.6;
    display: inline-block;
}

.btn-disabled {
    pointer-events: none;
}

.approval-stamp {
    position: absolute;
    top: 100px;
    right: 50px;
    transform: rotate(15deg);
    border: 3px solid #27ae60;
    padding: 20px;
    color: #27ae60;
    font-weight: bold;
    font-size: 18px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 5px;
}

.approval-info {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: none;
    color: white;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.dropbtn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 5px;
    overflow: hidden;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.3s ease;
}

.dropdown-content a:hover {
    background: #f8f9fa;
    color: #007bff;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown.active .dropdown-content {
    display: block;
}

/* Admin specific styles */
.admin-nav {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.admin-nav .nav-links a {
    color: white;
}

.admin-nav .dropdown-content {
    background: white;
    border: 1px solid #ddd;
}

.admin-nav .dropdown-content a {
    color: #333;
}

.admin-nav .dropdown-content a:hover {
    background: #007bff;
    color: white;
}

/* Responsive dropdown */
@media (max-width: 768px) {
    .dropdown {
        position: static;
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        background: #34495e;
    }
    
    .dropdown-content a {
        color: white;
        border-bottom: 1px solid #2c3e50;
        padding-left: 30px;
    }
    
    .dropdown-content a:hover {
        background: #2c3e50;
        color: #3498db;
    }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
    }
    
    .nav-links.active .dropdown {
        width: 100%;
    }
    
    .nav-links.active .dropbtn {
        width: 100%;
        text-align: left;
        padding: 15px 20px;
    }
}

/* Header specific responsive design */
@media (max-width: 768px) {
    .header nav {
        flex-direction: column;
        padding: 10px;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: left;
        margin-top: 15px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 10px 0;
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 12px 15px;
        width: 100%;
    }
    
    .welcome {
        text-align: center;
        padding: 10px;
        background: rgba(255,255,255,0.1);
        border-radius: 5px;
        margin-bottom: 10px;
    }
    
    .hamburger {
        display: flex;
        position: absolute;
        right: 20px;
        top: 15px;
    }
}

/* Enhanced mobile experience */
@media (max-width: 480px) {
    .logo h3 {
        font-size: 1.2rem;
    }
    
    .nav-links a {
        font-size: 14px;
    }
    
    .dropdown-content {
        min-width: 100%;
    }
}