@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1a252f;
    --secondary-color: #34495e;
    --accent-color: #e67e22;
    --draft-color: #f39c12;
    --waiting-color: #aca59b;
    --accepted-color: #27ae60;
    --refused-color: #e74c3c;
    --error-color: #e74c3c;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #dcdde1;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* Layout */
.container {
    width: 95%;
    max-width: 1200px;
    margin: 2rem auto;
}

header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.logo-accent {
    color: var(--accent-color);
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

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

.btn-primary:hover {
    background-color: #d35400;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--border-color);
}

.btn-edit {
    color: var(--accent-color);
    padding: 0.4rem;
    background: transparent;
}

.btn-edit:hover {
    background: rgba(230, 126, 34, 0.1);
}

/* Table Card */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th {
    text-align: left;
    padding: 1rem;
    background: #f8f9fa;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--bg-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-color);
    font-size: 0.95rem;
}

tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Badge Styles */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-draft {
    background: rgba(243, 156, 18, 0.1);
    color: var(--draft-color);
}

.badge-waiting {
    background: rgba(179, 190, 184, 0.1);
    color: var(--waiting-color);
}

.badge-accepted {
    background: rgba(39, 174, 96, 0.1);
    color: var(--accepted-color);
}

.badge-refused {
    background: rgba(231, 76, 60, 0.1);
    color: var(--refused-color);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: var(--card-bg);
    width: 90%;
    max-width: 650px;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 0.65rem;
}

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

#quotationForm .form-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#quotationForm .form-group label {
    flex: 0 0 130px;
    margin-bottom: 0;
    font-size: 0.9rem;
}

input,
select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

input:focus,
select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Utilities */
.text-right {
    text-align: right;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Login Page Styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c3e50 100%);
}

.login-container {
    background: white;
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s ease;
}

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

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

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

.error-message {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    padding: 0.8rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
    text-align: center;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Header utility for Logout */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-logout {
    color: white;
    opacity: 0.8;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Input Group & Picker */
.input-group {
    display: flex;
    flex: 1;
}

.input-group input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group .btn-icon {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 0 1rem;
    background: var(--bg-color);
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.input-group .btn-icon:hover {
    background: var(--border-color);
}

.picker-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.picker-item {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
}

.picker-item-code {
    font-weight: bold;
    color: var(--secondary-color);
    width: 250px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-item-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-item:last-child {
    border-bottom: none;
}

.picker-item:hover {
    background: var(--bg-color);
}

/* Attachment List */
.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    gap: 0.5rem;
}



.btn-icon-small {
    background: transparent;
    color: var(--secondary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon-small:hover {
    color: var(--primary-color);
}
.attachment-item.server {
    background: #f8fafc;
    border-left: 3px solid #94a3b8;
}

.attachment-item.pending {
    background: #f0f9ff;
    border-left: 3px solid #0ea5e9;
}

.attachment-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    line-height: 1.25;
}

.attachment-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.attachment-item-size {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.attachment-item.pending .attachment-item-size {
    color: #4382a9;
}

.attachment-item-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}
