:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --dark: #3a0ca3;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #dee2e6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.auth-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    width: 100%;
    max-width: 450px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.25);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--secondary);
}

.btn-block {
    display: block;
    width: 100%;
}

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

/* Dashboard */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand, .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.brand-logo, .logo img {
    max-width: 150px;
    max-height: 120px;
    width: auto;
    height: auto;
    display: block;
    margin: 0;
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-email {
    margin-right: 1rem;
    font-weight: 500;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table th, .table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-primary {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.badge-success {
    background-color: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #c53030;
}

.delete-btn, .delete-item-btn {
    margin-left: 5px;
    padding: 0.25rem 0.5rem;
}

.btn-group {
    display: inline-flex;
    gap: 0.3rem;
}

.btn-group .btn {
    margin: 0;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.text-nowrap {
    white-space: nowrap;
}

/* Quote Detail */
.margin-control {
    display: flex;
    gap: 10px;
    align-items: center;
}

.margin-type {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.margin-value {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.action-btn {
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background-color: var(--primary);
    color: white;
}

/* Upload Page */
.upload-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.file-drop-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.file-drop-area.active {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.05);
}

.file-msg {
    color: var(--gray);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.file-input {
    display: none;
}

.navbar-container nav {
    display: flex;
    gap: 1.5rem;
    margin-left: 2rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

.profile-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.vendor-logo {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    background-color: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #4361ee;
}

.upload-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.preview-container {
    margin-top: 30px;
    display: none;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.preview-table {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.error-message {
    color: #d9534f;
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 15px;
    display: none;
}

.error-message.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.error-message.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.company-name {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
}

.user-email {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.btn-logout {
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    white-space: nowrap;
}

.btn-logout:hover {
    background-color: #dee2e6;
    color: #212529;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-card h3 {
    margin-top: 0;
    color: #495057;
    font-size: 1.1rem;
}

.stat-card p {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 10px 0 0;
    color: #4361ee;
}

.status-ok {
    color: #28a745 !important;
}

.recent-activity {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.recent-activity h3 {
    margin-top: 0;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.recent-activity ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.recent-activity li {
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.recent-activity li:last-child {
    border-bottom: none;
}

.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.custom-confirm-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-confirm-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 450px;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s;
}

.custom-confirm-overlay.active .custom-confirm-modal {
    transform: scale(1);
}

.confirm-header {
    background: #e74c3c;
    color: white;
    padding: 20px;
    text-align: center;
}

.confirm-header i {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.confirm-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.confirm-body {
    padding: 25px 30px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

.confirm-footer {
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.confirm-btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.confirm-btn.cancel {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.3);
}

.confirm-btn.confirm {
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.3);
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.confirm-btn:active {
    transform: translateY(0);
}
