* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(145deg, #f0f4fa 0%, #d9e2ef 100%);
    min-height: 100vh;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.container {
    display: flex;
    gap: 1.5rem;
    max-width: 1300px;
    width: 100%;
    flex-wrap: wrap;
}

.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: 0 25px 45px -12px rgba(0, 20, 40, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.calculator-card {
    flex: 2;
    min-width: 500px;
}

.shifts-card {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    max-height: 800px;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.5px;
    color: #0b1f33;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

h1 span {
    background: #1e3a5f;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.2rem 0.8rem;
    border-radius: 40px;
    letter-spacing: 0.3px;
}

h2 {
    font-size: 1.4rem;
    color: #0b1f33;
    font-weight: 600;
}

.sub {
    color: #2c405c;
    font-weight: 400;
    font-size: 0.95rem;
    margin: 0 0 1.8rem 0;
    border-left: 3px solid #53789e;
    padding-left: 1rem;
    background: rgba(83, 120, 158, 0.08);
    border-radius: 0 8px 8px 0;
}

.currency-selector {
    margin-bottom: 1.5rem;
}

.currency-selector label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #14273e;
    margin-bottom: 0.4rem;
}

.currency-dropdown {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border-radius: 2rem;
    border: 2px solid rgba(30, 58, 95, 0.2);
    background: white;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

.input-group {
    margin-bottom: 1.2rem;
}

label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: #14273e;
    margin-bottom: 0.4rem;
}

.field {
    background: white;
    border-radius: 2rem;
    padding: 0.1rem 1.2rem;
    display: flex;
    align-items: center;
    border: 2px solid rgba(30, 58, 95, 0.2);
    transition: 0.2s;
}

.field:focus-within {
    border-color: #1e3a5f;
    box-shadow: 0 8px 16px -8px #1e3a5f40;
}

.field span {
    font-weight: 500;
    color: #53789e;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

input,
select {
    background: transparent;
    border: none;
    padding: 0.8rem 0;
    font-size: 1rem;
    width: 100%;
    outline: none;
    color: #0b1f33;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.row-duo {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.row-duo .input-group {
    flex: 1 1 180px;
}

.add-btn {
    background: #1e3a5f;
    color: white;
    border: none;
    border-radius: 3rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.15s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.5rem 0 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.add-btn:hover {
    background: #2a4a78;
    transform: scale(1.02);
}

.preview-card {
    background: #1e2f41e0;
    border-radius: 1.5rem;
    padding: 1.2rem 1.5rem;
    color: white;
    margin-top: 0.5rem;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-row:first-child {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

#previewHours,
#previewPay {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fee7a0;
}

.shifts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.clear-btn {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.15s;
}

.clear-btn:hover {
    background: rgba(220, 53, 69, 0.2);
}

.shifts-container {
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
    padding-right: 0.5rem;
}

.shift-item {
    background: white;
    border-radius: 1.2rem;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(30, 58, 95, 0.1);
    transition: 0.2s;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.shift-item:hover {
    transform: translateX(4px);
    border-color: #1e3a5f;
}

.shift-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.shift-title {
    font-weight: 600;
    color: #0b1f33;
    font-size: 1.1rem;
}

.shift-date {
    font-size: 0.8rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.shift-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #2c405c;
    margin-bottom: 0.5rem;
}

.shift-hours {
    background: #e9ecef;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}

.shift-rate {
    color: #495057;
}

.shift-pay {
    font-weight: 700;
    color: #1e3a5f;
    font-size: 1.2rem;
}

.delete-shift {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.2rem 0.5rem;
    border-radius: 50%;
    transition: 0.15s;
}

.delete-shift:hover {
    background: rgba(220, 53, 69, 0.1);
}

.grand-total {
    background: #1e3a5f;
    color: white;
    border-radius: 1.5rem;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
}

#totalAmount {
    color: #fee7a0;
    font-size: 1.6rem;
}

.shift-count {
    text-align: right;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 0.5rem;
}

.empty-state {
    text-align: center;
    color: #6c757d;
    padding: 3rem 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1.5rem;
    font-style: italic;
}

/* Scrollbar styling */
.shifts-container::-webkit-scrollbar {
    width: 6px;
}

.shifts-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.shifts-container::-webkit-scrollbar-thumb {
    background: rgba(30, 58, 95, 0.3);
    border-radius: 10px;
}

.shifts-container::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 58, 95, 0.5);
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }

    .calculator-card,
    .shifts-card {
        min-width: 100%;
    }

    body {
        padding: 1rem;
    }
}