/* NecesarBRO - Modern & Responsive CSS */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-muted: #6b7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar */
.navbar {
    background-color: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
}

.navbar-brand a {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.nav-user span {
    white-space: nowrap;
}

.btn-logout {
    color: var(--danger-color);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

.btn-logout:hover {
    background-color: #fee2e2;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--text-muted);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--dark-color);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    background-color: #2563eb;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Cards */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
}

.card-header h3 {
    font-size: 1.25rem;
    color: var(--dark-color);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    padding-bottom: 3.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.draft {
    background-color: var(--text-muted);
}

.stat-icon.pending {
    background-color: var(--warning-color);
}

.stat-icon.approved {
    background-color: var(--success-color);
}

.stat-icon.rejected {
    background-color: var(--danger-color);
}

.stat-icon.warning {
    background-color: var(--warning-color);
}

.stat-content h3 {
    font-size: 2rem;
    color: var(--dark-color);
    margin: 0;
}

.stat-content p {
    color: var(--text-muted);
    margin: 0;
}

.stat-link {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 1rem;
    background-color: var(--light-color);
    text-align: center;
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.stat-link:hover {
    background-color: #e0e7ff;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.table thead {
    background-color: #f8fafc;
}

.table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: var(--light-color);
}

.table tfoot th {
    background-color: #f8fafc;
    font-weight: bold;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-lg {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.badge-draft {
    background-color: #e5e7eb;
    color: var(--text-color);
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-manager_pending {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-in_procurement {
    background-color: #ede9fe;
    color: #6b21a8;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.flex-2 {
    grid-column: span 2;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Auth Pages */
.auth-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-container {
    width: 100%;
    max-width: 1200px;
}

.auth-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 4rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.demo-credentials {
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.demo-credentials ul {
    list-style: none;
    margin-top: 0.5rem;
}

.demo-credentials li {
    padding: 0.25rem 0;
}

/* Request Details */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

/* Item Rows */
.item-row {
    padding: 1rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer p {
    margin: 0.5rem 0;
}

.developer-credits {
    color: #FFD700;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.4),
        0 0 40px rgba(255, 165, 0, 0.3),
        0 0 50px rgba(255, 165, 0, 0.2);
    animation: goldPulse 2s ease-in-out infinite;
    letter-spacing: 0.5px;
}

@keyframes goldPulse {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(255, 215, 0, 0.8),
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 30px rgba(255, 215, 0, 0.4),
            0 0 40px rgba(255, 165, 0, 0.3),
            0 0 50px rgba(255, 165, 0, 0.2);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 1),
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.6),
            0 0 50px rgba(255, 165, 0, 0.5),
            0 0 60px rgba(255, 165, 0, 0.4),
            0 0 70px rgba(255, 215, 0, 0.3);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-menu {
        width: 100%;
        justify-content: center;
    }
    
    .nav-user {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 1rem;
        margin-left: 0;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .flex-2 {
        grid-column: span 1;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.section {
    margin-bottom: 2rem;
}

.section h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* Low Stock Highlight */
tr.low-stock {
    background-color: #fef3c7 !important;
}

tr.low-stock:hover {
    background-color: #fde68a !important;
}

/* Filters */
.filters {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto auto;
    gap: 1rem;
    align-items: end;
}

.date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    grid-column: span 2;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.date-input-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
    .filter-form {
        grid-template-columns: 1fr;
    }
    
    .date-range {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}

/* Authentication Pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    width: 100%;
}

.auth-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-color);
}

.auth-header i {
    font-size: 3rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--primary-color);
}

.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-block {
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #047857;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
}

