:root
{
    --primary-color: #dcc11a;
    --secondary-color: #605e55;
    --accent-color: #fadd4f;
    --error-color: #dc3545;
    --success-color: #28a745;
    --gradient-from: #b4b4b4;
    --gradient-to: #363324;
    --button-gradient-from: #dcc11a;
    --button-gradient-to: #ffd400;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.btn-primary
{
    background: linear-gradient(135deg, var(--button-gradient-from) 0%, var(--button-gradient-to) 100%);
    color: #333;
    border: none;
}

.btn-primary:hover
{
    opacity: 0.9;
}

/* ========== LOGIN STYLES ========== */
body {
    font-family: var(--font-family);
}

/* Login Page */
body.page {
    background: linear-gradient(135deg, var(--gradient-from) 0%, var(--gradient-to) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-header h2 {
    color: #333;
    margin: 15px 0 5px;
    font-weight: 600;
}

.login-header p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

.pin-input-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 30px 0;
}

.pin-input {
    width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 24px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
}

.pin-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pin-input.filled {
    border-color: var(--accent-color);
}

.pin-input.error {
    border-color: #dc3545;
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.btn-submit {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gradient-from) 0%, var(--gradient-to) 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
    display: none;
    text-align: center;
}

.spinner-border {
    display: none;
    width: 16px;
    height: 16px;
    margin-left: 8px;
}

.btn-submit.loading .spinner-border {
    display: inline-block;
}

.btn-submit.loading {
    pointer-events: none;
}

/* ========== INVOICE STYLES ========== */
body.invoice-page {
    background: linear-gradient(135deg, var(--gradient-from) 0%, var(--gradient-to) 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.invoice-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.invoice-header {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.invoice-header h1 {
    margin: 0;
    font-weight: bold;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.section-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--primary-color);
}

.client-selector {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.client-selector select {
    flex: 1;
}

.btn-add-client {
    background: var(--primary-color);
    border: none;
    color: #333;
    padding: 10px 20px;
    border-radius: 5px;
    white-space: nowrap;
}

.btn-add-client:hover {
    background: var(--accent-color);
    color: #222;
}

.modal-header {
    background: linear-gradient(135deg, var(--gradient-from) 0%, var(--gradient-to) 100%);
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.invoice-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    position: relative;
}

.invoice-item .remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

.item-summary {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: right;
}

.item-total {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    text-align: right;
}

.invoice-total {
    background: linear-gradient(135deg, var(--gradient-from) 0%, var(--gradient-to) 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: right;
    margin: 30px 0;
}

.btn-add-item {
    background: var(--primary-color);
    border: none;
    color: #333;
    margin-top: 10px;
}

.btn-add-item:hover {
    background: var(--accent-color);
    color: #222;
}

.btn-send {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    width: 100%;
}

.btn-send:hover {
    opacity: 0.9;
    color: white;
}

.required-field::after {
    content: " *";
    color: red;
}

.form-label {
    font-weight: 600;
    color: #333;
}

.spinner {
    display: none;
}

.spinner.show {
    display: inline-block;
}

.new-client-badge {
    background: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 5px;
}

/* ========== APPROVAL PAGE STYLES ========== */
body.approval-page {
    font-family: Arial, sans-serif;
    margin: 40px;
    background-color: #f5f5f5;
}

.container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
}

h2 {
    color: #333;
}

h3 {
    color: #333;
    margin-top: 25px;
}

p {
    color: #555;
    line-height: 1.6;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #4CAF50;
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

.total {
    font-weight: bold;
    font-size: 1.2em;
}

.button-group {
    margin-top: 30px;
    text-align: center;
}

button {
    padding: 12px 30px;
    margin: 0 10px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.approve {
    background-color: var(--success-color);
    color: white;
}

.approve:hover {
    opacity: 0.9;
}

.reject {
    background-color: var(--error-color);
    color: white;
}

.reject:hover {
    opacity: 0.9;
}

button:active {
    transform: scale(0.98);
}

strong {
    color: #333;
}

/* ========== ERROR PAGE STYLES ========== */
body.error-page {
    background: linear-gradient(135deg, var(--gradient-from) 0%, var(--gradient-to) 100%);
    min-height: 100vh;
    padding: 20px 0;
    margin: 0;
}

.error-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    max-width: 600px;
    text-align: center;
}

.error-icon {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 20px;
}

.error-title {
    font-size: 2rem;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 10px;
}

.error-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.error-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: left;
    border-left: 4px solid #dc3545;
}

.detail-item {
    margin-bottom: 12px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.action-buttons a {
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-home {
    background: linear-gradient(135deg, var(--gradient-from) 0%, var(--gradient-to) 100%);
    color: white;
    border: none;
}

.btn-home:hover {
    opacity: 0.9;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

@media (max-width: 600px) {
    .error-card {
        padding: 30px 20px;
        margin: 20px;
    }

    .error-title {
        font-size: 1.5rem;
    }

    .error-icon {
        font-size: 3rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons a {
        width: 100%;
        justify-content: center;
    }
}

/* ========== COMMON STYLES ========== */
.alert {
    margin-bottom: 20px;
    border-radius: 8px;
    border: none;
}

/* RESULT STYLES */
.result-container
{
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-card
{
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    max-width: 600px;
    text-align: center;
}

.result-icon
{
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-icon.success
{
    color: #28a745;
}

.result-icon.reject
{
    color: #dc3545;
}

.result-title
{
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-title.success
{
    color: #28a745;
}

.result-title.reject
{
    color: #dc3545;
}

.result-subtitle
{
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.invoice-info
{
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: left;
}

.info-row
{
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.info-row:last-child
{
    border-bottom: none;
}

.info-label
{
    font-weight: 600;
    color: #333;
}

.info-value
{
    color: #666;
}

.action-buttons
{
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.action-buttons a
{
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-home
{
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-home:hover
{
    opacity: 0.9;
    color: white;
}

.btn-print
{
    background: #f8f9fa;
    color: #333;
    border: 2px solid #667eea;
}

.btn-print:hover
{
    background: #667eea;
    color: white;
}

@media print
{
    body
    {
        background: white;
    }

    .action-buttons
    {
        display: none;
    }

    .result-container
    {
        min-height: auto;
    }
}