body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    padding: 10px;
    scroll-behavior: auto;
}

html {
    scroll-behavior: auto;
    overflow: hidden;
}

.background-shapes div {
    position: absolute;
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(#f5deb3, #f5deb3);
    top: -100px;
    left: -100px;
    opacity: 0.3;
    animation: float 25s ease-in-out infinite, pulse 8s ease-in-out infinite;
}

.shape2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(#f5deb3, #f5deb3);
    bottom: -150px;
    right: -150px;
    opacity: 0.2;
    animation: float 30s ease-in-out infinite reverse, pulse 10s ease-in-out infinite;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

.dashboard-container {
    width: 95%;
    max-width: 1400px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    animation: slideInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-header {
    background: transparent;
    color: #fff;
    padding: 20px 30px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(245, 222, 179, 0.1);
    animation: slideInFromTop 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    max-width: 100%;
    position: relative;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 2em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
    color: #f5deb3;
    flex: 1;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    pointer-events: none;
}

@keyframes fadeInScaleHeader {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
    margin-left: auto;
    z-index: 10;
    position: relative;
}

#user-display {
    color: #f5deb3;
    font-size: 0.95em;
    font-weight: 600;
}

.logout-btn {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #f44336;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.logout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(244, 67, 54, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.logout-btn:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: #f44336;
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.3);
    transform: translateY(-2px);
}

.logout-btn:hover::before {
    width: 300px;
    height: 300px;
}

.logout-btn:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s;
}

.dashboard-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-gap: 20px;
    padding: 20px 30px;
    flex: 1;
    overflow: hidden;
    align-items: start;
}

.sidebar {
    grid-column: 2 / 3;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    max-height: 100%;
    align-items: stretch;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.trade-entry-container,
.pnl-summary-container {
    padding: 20px;
    background: rgba(245, 222, 179, 0.05);
    border-radius: 15px;
    border-top: 1px solid rgba(245, 222, 179, 0.2);
    border-left: 1px solid rgba(245, 222, 179, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.calendar-container,
.modal-content {
    background: rgba(245, 222, 179, 0.05);
    border-radius: 15px;
    border-top: 1px solid rgba(245, 222, 179, 0.2);
    border-left: 1px solid rgba(245, 222, 179, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.calendar-container {
    grid-column: 1 / 2;
    padding: 20px;
    overflow-y: auto;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

.calendar-container::-webkit-scrollbar {
    display: none;
}

.calendar-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 5px;
    gap: 15px;
}

.calendar-header button {
    background: rgba(245, 222, 179, 0.15);
    color: #fff;
    border: 1px solid rgba(245, 222, 179, 0.3);
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.calendar-header button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(245, 222, 179, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.calendar-header button:hover {
    background: rgba(245, 222, 179, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 222, 179, 0.2);
}

.calendar-header button:hover::before {
    width: 200px;
    height: 200px;
}

.calendar-header button:active {
    transform: scale(1.05);
    transition: all 0.1s;
}

.calendar-header h2 {
    margin: 0;
    font-size: 1.5em;
    flex: 1;
    text-align: center;
    color: #f5deb3;
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    flex: 1;
}

.calendar-day {
    background-color: rgba(245, 222, 179, 0.05);
    border: 1px solid rgba(245, 222, 179, 0.15);
    padding: 8px;
    min-height: 80px;
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9em;
    animation: fadeInScale 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    opacity: 0;
}

.calendar-day:not(.day-name):hover {
    transform: translateY(-2px) scale(1.02);
    background-color: rgba(245, 222, 179, 0.1);
    border-color: rgba(245, 222, 179, 0.25);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.calendar-day:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s;
}

.calendar-day:nth-child(1) { animation-delay: 0.05s; }
.calendar-day:nth-child(2) { animation-delay: 0.1s; }
.calendar-day:nth-child(3) { animation-delay: 0.15s; }
.calendar-day:nth-child(4) { animation-delay: 0.2s; }
.calendar-day:nth-child(5) { animation-delay: 0.25s; }
.calendar-day:nth-child(6) { animation-delay: 0.3s; }
.calendar-day:nth-child(7) { animation-delay: 0.35s; }
.calendar-day:nth-child(8) { animation-delay: 0.4s; }
.calendar-day:nth-child(9) { animation-delay: 0.45s; }
.calendar-day:nth-child(10) { animation-delay: 0.5s; }
.calendar-day:nth-child(11) { animation-delay: 0.55s; }
.calendar-day:nth-child(12) { animation-delay: 0.6s; }
.calendar-day:nth-child(13) { animation-delay: 0.65s; }
.calendar-day:nth-child(14) { animation-delay: 0.7s; }
.calendar-day:nth-child(15) { animation-delay: 0.75s; }
.calendar-day:nth-child(16) { animation-delay: 0.8s; }
.calendar-day:nth-child(17) { animation-delay: 0.85s; }
.calendar-day:nth-child(18) { animation-delay: 0.9s; }
.calendar-day:nth-child(19) { animation-delay: 0.95s; }
.calendar-day:nth-child(20) { animation-delay: 1s; }
.calendar-day:nth-child(n+21) { animation-delay: 1.05s; }



.calendar-day:active {
    transform: translateY(-2px) scale(1.01);
    transition: all 0.1s;
}

.calendar-day.day-name {
    background: transparent;
    border: none;
    text-align: center;
    font-weight: bold;
    min-height: auto;
    padding: 5px;
    cursor: default;
}

.calendar-day .day-number {
    font-weight: bold;
}

.calendar-day .pnl {
    font-size: 0.9em;
    margin-top: 5px;
    font-weight: bold;
}

.pnl.positive {
    color: #4caf50;
    font-weight: bold;
}

.pnl.negative {
    color: #f44336;
    font-weight: bold;
}

/* Animations */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-container {
    animation: slideInFromLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.trade-entry-container {
    animation: slideInFromRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.pnl-summary-container {
    animation: slideInFromRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.trade-entry-container {
    flex-grow: 1;
}

.pnl-summary-container {
    flex-shrink: 0;
}

.trade-entry-container h2,
.pnl-summary-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #f5deb3;
    border-bottom: 2px solid rgba(245, 222, 179, 0.3);
    padding-bottom: 12px;
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group:last-of-type {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #f5deb3;
    font-size: 0.95em;
    font-weight: 500;
}

.date-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.date-input-wrapper input {
    flex: 1;
    padding: 10px 12px;
    background: rgba(245, 222, 179, 0.08);
    border: 1px solid rgba(245, 222, 179, 0.3);
    border-radius: 8px;
    color: #f5deb3;
    font-size: 0.95em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.date-input-wrapper input:hover {
    background: rgba(245, 222, 179, 0.12);
    border-color: rgba(245, 222, 179, 0.5);
    box-shadow: 0 2px 8px rgba(245, 222, 179, 0.1);
}

.date-input-wrapper input:focus {
    outline: none;
    background: rgba(245, 222, 179, 0.15);
    border-color: #f5deb3;
    box-shadow: 0 0 0 3px rgba(245, 222, 179, 0.15);
}

/* Style for date input calendar icon */
.date-input-wrapper input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.8) sepia(0.5) hue-rotate(40deg);
}

.today-btn {
    padding: 8px 12px;
    background: rgba(245, 222, 179, 0.2);
    color: #f5deb3;
    border: 1px solid rgba(245, 222, 179, 0.4);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.today-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(245, 222, 179, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.today-btn:hover {
    background: rgba(245, 222, 179, 0.3);
    border-color: #f5deb3;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 222, 179, 0.2);
}

.today-btn:hover::before {
    width: 200px;
    height: 200px;
}

.today-btn.active {
    background: #f5deb3;
    color: #333;
    border-color: #f5deb3;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(245, 222, 179, 0.3);
}

.today-btn.active:hover {
    background: #e8d4a0;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 222, 179, 0.4);
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(245, 222, 179, 0.3);
    border-radius: 8px;
    background: rgba(245, 222, 179, 0.05);
    color: #fff;
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95em;
    position: relative;
}

.form-group input:focus {
    outline: none;
    border-color: #f5deb3;
    background: rgba(245, 222, 179, 0.12);
    box-shadow: 0 0 15px rgba(245, 222, 179, 0.3), 0 4px 12px rgba(245, 222, 179, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover:not(:focus) {
    border-color: rgba(245, 222, 179, 0.5);
    background: rgba(245, 222, 179, 0.08);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Datalist styling */
datalist option {
    background: #1a1a1a;
    color: #f5deb3;
}

#pairs-list option {
    padding: 8px;
    background-color: #2a2a2a;
    color: #f5deb3;
}

#trade-form button {
    width: 100%;
    padding: 10px;
    background: #f5deb3;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(245, 222, 179, 0.2);
    position: relative;
    overflow: hidden;
}

#trade-form button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#trade-form button:hover {
    background: #e8d4a0;
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.4);
    transform: translateY(-3px) scale(1.02);
}

#trade-form button:hover::before {
    width: 400px;
    height: 400px;
}

#trade-form button:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s;
}

.pnl-summary .summary-item {
    background: rgba(245, 222, 179, 0.1);
    padding: 15px 18px;
    border-radius: 10px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(245, 222, 179, 0.2);
    position: relative;
    overflow: hidden;
}

.pnl-summary .summary-item:last-child {
    margin-bottom: 0;
}

.pnl-summary .summary-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(245, 222, 179, 0.1), rgba(245, 222, 179, 0.2));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.pnl-summary .summary-item:hover {
    background: rgba(245, 222, 179, 0.15);
    border-color: rgba(245, 222, 179, 0.4);
    box-shadow: 0 6px 20px rgba(245, 222, 179, 0.2);
    transform: translateX(4px);
}

.pnl-summary .summary-item:hover::before {
    width: 100%;
}

.pnl-summary .summary-item h3,
.pnl-summary .summary-item p {
    position: relative;
    z-index: 1;
}

.pnl-summary h3 {
    margin: 0;
    font-weight: 500;
    font-size: 0.9em;
    color: #fff;
}

.pnl-summary p {
    margin: 0;
    font-weight: bold;
    font-size: 1.1em;
    color: #f5deb3;
}

.balance-item {
    background: rgba(245, 222, 179, 0.15) !important;
    border: 2px solid rgba(245, 222, 179, 0.4) !important;
    box-shadow: 0 0 15px rgba(245, 222, 179, 0.2) !important;
}

.balance-item p {
    font-size: 1.3em !important;
    font-weight: 700 !important;
}

.balance-item.positive p {
    color: #4ade80 !important;
}

.balance-item.negative p {
    color: #ff6b6b !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                backdrop-filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    margin: 15% auto;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    position: relative;
    color: #fff;
    opacity: 0;
    transform: scale(0.8) translateY(-30px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.show .modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.trade-modal-content {
    background: rgba(245, 222, 179, 0.08);
    border: 2px solid rgba(245, 222, 179, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
    max-width: 450px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.trade-modal-header {
    background: rgba(245, 222, 179, 0.1);
    border-bottom: 2px solid rgba(245, 222, 179, 0.2);
    padding: 20px;
    text-align: center;
}

.trade-modal-header h3 {
    margin: 0;
    color: #f5deb3;
    font-size: 1.3em;
    font-weight: 600;
}

.trade-modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.trade-modal-body::-webkit-scrollbar {
    width: 6px;
}

.trade-modal-body::-webkit-scrollbar-track {
    background: rgba(245, 222, 179, 0.05);
}

.trade-modal-body::-webkit-scrollbar-thumb {
    background: rgba(245, 222, 179, 0.3);
    border-radius: 3px;
}

.trade-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 222, 179, 0.5);
}

#modal-trades-list div {
    background: rgba(245, 222, 179, 0.08);
    border: 1px solid rgba(245, 222, 179, 0.15);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    color: #fff;
    font-size: 0.95em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    opacity: 0;
}

#modal-trades-list div:nth-child(1) { animation-delay: 0.05s; }
#modal-trades-list div:nth-child(2) { animation-delay: 0.1s; }
#modal-trades-list div:nth-child(3) { animation-delay: 0.15s; }
#modal-trades-list div:nth-child(4) { animation-delay: 0.2s; }
#modal-trades-list div:nth-child(5) { animation-delay: 0.25s; }
#modal-trades-list div:nth-child(n+6) { animation-delay: 0.3s; }

#modal-trades-list div:hover {
    background: rgba(245, 222, 179, 0.15);
    border-color: rgba(245, 222, 179, 0.4);
    box-shadow: 0 6px 20px rgba(245, 222, 179, 0.2);
    transform: translateX(4px) scale(1.02);
}

.trade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.trade-item span {
    flex: 1;
}

.delete-trade-btn {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #f44336;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.delete-trade-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(244, 67, 54, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.delete-trade-btn:hover {
    background: rgba(244, 67, 54, 0.4);
    border-color: #f44336;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
    transform: scale(1.1) rotate(90deg);
}

.delete-trade-btn:hover::before {
    width: 150px;
    height: 150px;
}

.delete-trade-btn:active {
    transform: scale(0.95) rotate(90deg);
    transition: all 0.1s;
}

.summary-modal-content {
    max-width: 600px;
    padding: 0;
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4)), url('Shrek-animacja-bajka-1400625239.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 15px;
    overflow: hidden;
    padding: 0;
    min-height: 400px;
    position: relative;
    border: 2px solid rgba(245, 222, 179, 0.3);
}

.card-header {
    position: absolute;
    top: 0;
    left: 0;
    padding: 15px;
    z-index: 3;
}

.card-header span {
    color: #fff;
    font-size: 1.2em;
    font-weight: 600;
    text-align: left;
}

.card-period {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    padding: 0;
    margin: 0;
}

.card-period span {
    color: #fff;
    font-size: 0.95em;
    text-align: right;
    font-weight: 500;
    line-height: 1.4;
    display: block;
}

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    height: 100%;
    padding: 0;
    padding-left: 20px;
    padding-bottom: 20px;
    z-index: 2;
    position: absolute;
    bottom: 0;
    left: 0;
    width: auto;
    gap: 8px;
}

.card-row {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
    margin: 0;
    line-height: 1.4;
}

.card-row span {
    color: #fff;
    font-size: 0.95em;
    text-align: left;
    font-weight: 500;
}

.card-row.earnings {
    padding: 0;
    margin: 0;
    margin-top: 5px;
}

.card-row.earnings p {
    margin: 0;
    font-size: 3.5em;
    font-weight: bold;
    color: #f5deb3;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.close-btn {
    color: #fff;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    opacity: 0.7;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.close-btn:hover,
.close-btn:focus {
    color: #f5deb3;
    text-decoration: none;
    cursor: pointer;
    opacity: 1;
}

/* Footer Styles */
.dashboard-footer {
    text-align: center;
    padding: 15px 30px;
    border-top: 1px solid rgba(245, 222, 179, 0.1);
    flex-shrink: 0;
    margin-top: auto;
    animation: slideInFromBottom 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dashboard-footer p {
    margin: 0;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.6);
}

.dashboard-footer a {
    color: #f5deb3;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
}

.dashboard-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.heart {
    color: #f44336;
    margin: 0 2px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
}

/* Mobile Responsive Design */
/* Chart Modal Styles */
.chart-modal-content {
    background: rgba(245, 222, 179, 0.08);
    border: 2px solid rgba(245, 222, 179, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
    max-width: 1000px;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.chart-modal-header {
    background: rgba(245, 222, 179, 0.1);
    border-bottom: 2px solid rgba(245, 222, 179, 0.2);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-modal-header h2 {
    margin: 0;
    color: #f5deb3;
    font-size: 1.5em;
    font-weight: 600;
}

.close-btn-chart {
    color: #f5deb3;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn-chart:hover {
    color: #fff;
    background: rgba(245, 222, 179, 0.3);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 222, 179, 0.3);
}

.chart-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    flex: 1;
}

.chart-modal-body::-webkit-scrollbar {
    width: 8px;
}

.chart-modal-body::-webkit-scrollbar-track {
    background: rgba(245, 222, 179, 0.05);
}

.chart-modal-body::-webkit-scrollbar-thumb {
    background: rgba(245, 222, 179, 0.3);
    border-radius: 4px;
}

.chart-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 222, 179, 0.5);
}

.chart-settings {
    background: rgba(245, 222, 179, 0.06);
    border: 1px solid rgba(245, 222, 179, 0.15);
    border-radius: 10px;
    padding: 15px;
}

.settings-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 180px;
}

.setting-item label {
    color: #f5deb3;
    font-size: 0.9em;
    font-weight: 600;
}

.setting-item input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(245, 222, 179, 0.3);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95em;
    transition: all 0.3s;
}

.setting-item input:focus {
    outline: none;
    border-color: rgba(245, 222, 179, 0.7);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(245, 222, 179, 0.2);
}

.setting-item input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.checkbox-item {
    min-width: auto !important;
    flex: 0 !important;
}

.checkbox-item label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    margin: 0 !important;
}

.checkbox-item input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    accent-color: #f5deb3 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.checkbox-item span {
    color: #f5deb3 !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
    user-select: none !important;
}

.update-limits-btn {
    background: #f5deb3 !important;
    color: #333 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 0.95em !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 10px 20px !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 15px rgba(245, 222, 179, 0.2) !important;
    min-width: 150px !important;
}

.update-limits-btn:hover {
    background: #e8d4a0 !important;
    box-shadow: 0 6px 20px rgba(245, 222, 179, 0.3) !important;
    transform: translateY(-2px) !important;
}

.update-limits-btn:active {
    transform: translateY(0) !important;
}

.chart-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(245, 222, 179, 0.15);
    border-radius: 10px;
    padding: 15px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-chart-btn {
    background: #f5deb3 !important;
    color: #333 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 0.95em !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 24px !important;
    margin-top: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.view-chart-btn::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translate(-50%, -50%) !important;
    transition: width 0.6s, height 0.6s !important;
}

.view-chart-btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.4) !important;
}

.view-chart-btn:hover::before {
    width: 400px !important;
    height: 400px !important;
}

.view-chart-btn:active {
    transform: translateY(-1px) scale(0.98) !important;
    transition: all 0.1s !important;
}

/* Statistics Modal Styles */
.stats-modal-content {
    background: rgba(245, 222, 179, 0.08);
    border: 2px solid rgba(245, 222, 179, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
    max-width: 900px;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.stats-modal-header {
    background: rgba(245, 222, 179, 0.1);
    border-bottom: 2px solid rgba(245, 222, 179, 0.2);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-modal-header h2 {
    margin: 0;
    color: #f5deb3;
    font-size: 1.5em;
    font-weight: 600;
}

.close-btn-stats {
    color: #f5deb3;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn-stats:hover {
    color: #fff;
    background: rgba(245, 222, 179, 0.3);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 222, 179, 0.3);
}

.stats-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.stats-modal-body::-webkit-scrollbar {
    width: 8px;
}

.stats-modal-body::-webkit-scrollbar-track {
    background: rgba(245, 222, 179, 0.05);
}

.stats-modal-body::-webkit-scrollbar-thumb {
    background: rgba(245, 222, 179, 0.3);
    border-radius: 4px;
}

.stats-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 222, 179, 0.5);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-item {
    background: rgba(245, 222, 179, 0.08);
    border: 1px solid rgba(245, 222, 179, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    opacity: 0;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.15s; }
.stat-item:nth-child(3) { animation-delay: 0.2s; }
.stat-item:nth-child(4) { animation-delay: 0.25s; }
.stat-item:nth-child(5) { animation-delay: 0.3s; }
.stat-item:nth-child(6) { animation-delay: 0.35s; }
.stat-item:nth-child(7) { animation-delay: 0.4s; }
.stat-item:nth-child(8) { animation-delay: 0.45s; }
.stat-item:nth-child(9) { animation-delay: 0.5s; }

.stat-item:hover {
    background: rgba(245, 222, 179, 0.15);
    border-color: rgba(245, 222, 179, 0.5);
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.25);
    transform: translateY(-4px) scale(1.03);
}

.stat-item h3 {
    margin: 0 0 15px 0;
    color: #f5deb3;
    font-size: 0.95em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item p {
    margin: 0;
    color: #fff;
    font-size: 1.8em;
    font-weight: bold;
}

.stat-item .positive-stat {
    color: #4ade80;
}

.stat-item .negative-stat {
    color: #ff6b6b;
}

.view-chart-btn:hover {
    background: #e8d4a0 !important;
    box-shadow: 0 6px 20px rgba(245, 222, 179, 0.3) !important;
    transform: translateY(-2px) !important;
}

.view-chart-btn:active {
    transform: translateY(0) !important;
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .dashboard-container {
        height: 100vh;
        max-height: 100vh;
        width: 100%;
    }

    .background-shapes {
        display: none;
    }

    .dashboard-header {
        background: linear-gradient(135deg, rgba(245, 222, 179, 0.1), rgba(0, 0, 0, 0.3));
        border-bottom: 2px solid rgba(245, 222, 179, 0.3);
        padding: 12px 15px;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .header-content {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .dashboard-header h1 {
        font-size: 1.3em;
        margin: 0;
        flex: 1;
        text-align: left;
    }

    .auth-status {
        display: flex;
        gap: 8px;
        align-items: center;
        flex-shrink: 0;
    }

    #user-display {
        font-size: 0.75em;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .logout-btn {
        padding: 5px 10px;
        font-size: 0.75em;
    }

    /* Main content area - changed to single column with scrollable cards */
    .dashboard-main {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        gap: 0;
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden;
        flex: 1;
    }

    .dashboard-main::-webkit-scrollbar {
        width: 4px;
    }

    .dashboard-main::-webkit-scrollbar-track {
        background: transparent;
    }

    .dashboard-main::-webkit-scrollbar-thumb {
        background: rgba(245, 222, 179, 0.3);
        border-radius: 2px;
    }

    /* Calendar takes priority on mobile - full width card */
    .calendar-container {
        grid-column: unset;
        width: 100%;
        max-height: none;
        padding: 12px;
        border-radius: 0;
        background: transparent;
        border: none;
        backdrop-filter: none;
        border-bottom: 1px solid rgba(245, 222, 179, 0.1);
    }

    .calendar-header {
        margin-bottom: 15px;
    }

    .calendar-header button {
        padding: 8px 12px;
        font-size: 1em;
    }

    .calendar-header h2 {
        font-size: 1.2em;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
    }

    .calendar-day {
        min-height: 55px;
        padding: 5px;
        font-size: 0.75em;
        border-radius: 6px;
    }

    .calendar-day .day-number {
        font-size: 0.9em;
        font-weight: bold;
    }

    .calendar-day .pnl {
        font-size: 0.75em;
        margin-top: 3px;
    }

    /* Sidebar becomes card stack on mobile */
    .sidebar {
        grid-column: unset;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
        overflow-y: visible;
        max-height: none;
        padding-bottom: 70px;
    }

    /* Trade entry and summary as full-width stacked cards */
    .trade-entry-container,
    .pnl-summary-container {
        padding: 15px;
        margin: 0;
        border-radius: 12px;
        border: none;
        border-top: 1px solid rgba(245, 222, 179, 0.1);
        border-bottom: 1px solid rgba(245, 222, 179, 0.1);
        background: rgba(245, 222, 179, 0.02);
        width: 100%;
        box-sizing: border-box;
    }

    .trade-entry-container {
        order: 2;
    }

    .pnl-summary-container {
        order: 1;
    }

    .trade-entry-container h2,
    .pnl-summary-container h2 {
        font-size: 1em;
        margin-top: 0;
        margin-bottom: 12px;
        color: #f5deb3;
        border-bottom: 2px solid #f5deb3;
        padding-bottom: 8px;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .form-group label {
        font-size: 0.9em;
        margin-bottom: 4px;
    }

    .form-group input {
        font-size: 0.9em;
        padding: 8px;
        width: 100%;
    }

    .date-input-wrapper {
        display: flex;
        gap: 6px;
        align-items: center;
    }

    .date-input-wrapper input {
        flex: 1;
    }

    .today-btn {
        padding: 6px 10px;
        font-size: 0.85em;
        white-space: nowrap;
    }

    #trade-form button {
        font-size: 0.95em;
        padding: 10px;
        width: 100%;
    }

    /* PnL Summary - redesigned for mobile */
    .pnl-summary {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .pnl-summary .summary-item {
        background: rgba(245, 222, 179, 0.08);
        padding: 12px;
        border-radius: 10px;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 6px;
        border: 1px solid rgba(245, 222, 179, 0.15);
    }

    .pnl-summary h3 {
        font-size: 0.8em;
        margin: 0;
        color: rgba(255, 255, 255, 0.7);
    }

    .pnl-summary p {
        font-size: 1.1em;
        margin: 0;
        color: #f5deb3;
    }

    .balance-item {
        grid-column: 1 / -1;
        background: rgba(245, 222, 179, 0.12) !important;
        border: 2px solid rgba(245, 222, 179, 0.3) !important;
    }

    .balance-item p {
        font-size: 1.4em !important;
        font-weight: 700 !important;
    }

    .view-chart-btn {
        width: 100% !important;
        margin-top: 12px !important;
        padding: 10px !important;
        font-size: 0.9em !important;
    }

    /* Modal adjustments */
    .modal-content {
        width: 90%;
        max-width: 450px;
        margin: 30% auto;
        border-radius: 15px;
    }

    .trade-modal-content {
        max-width: 90vw;
    }

    .summary-modal-content {
        max-width: 90vw;
    }

    .dashboard-footer {
        display: none;
    }
}

@media (max-width: 480px) {
    * {
        box-sizing: border-box;
    }

    body {
        padding: 0;
        margin: 0;
    }

    .dashboard-container {
        height: 100vh;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .background-shapes {
        display: none;
    }

    /* Header - Compact mobile header */
    .dashboard-header {
        background: linear-gradient(135deg, rgba(245, 222, 179, 0.12), rgba(0, 0, 0, 0.4));
        border-bottom: 2px solid rgba(245, 222, 179, 0.25);
        padding: 10px 12px;
        flex-shrink: 0;
        z-index: 20;
    }

    .header-content {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .dashboard-header h1 {
        font-size: 1.1em;
        margin: 0;
        flex: 1;
        text-align: left;
        letter-spacing: 0.5px;
    }

    .auth-status {
        display: flex;
        gap: 6px;
        align-items: center;
    }

    #user-display {
        font-size: 0.7em;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .logout-btn {
        padding: 4px 8px;
        font-size: 0.7em;
    }

    /* Main content - tabbed/scrollable layout */
    .dashboard-main {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        gap: 0;
        padding: 0;
        overflow-y: auto;
        flex: 1;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .dashboard-main::-webkit-scrollbar {
        width: 3px;
    }

    .dashboard-main::-webkit-scrollbar-thumb {
        background: rgba(245, 222, 179, 0.2);
    }

    /* Calendar section */
    .calendar-container {
        width: 100%;
        max-height: none;
        padding: 12px 10px;
        border-radius: 0;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(245, 222, 179, 0.12);
        flex-shrink: 0;
    }

    .calendar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        gap: 8px;
    }

    .calendar-header button {
        background: rgba(245, 222, 179, 0.12);
        color: #f5deb3;
        border: 1px solid rgba(245, 222, 179, 0.25);
        padding: 6px 10px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.95em;
        transition: all 0.2s;
        flex: 0;
    }

    .calendar-header h2 {
        font-size: 1.05em;
        margin: 0;
        text-align: center;
        flex: 1;
    }

    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 1px;
        background: rgba(245, 222, 179, 0.05);
        padding: 1px;
    }

    .calendar-day {
        background: rgba(245, 222, 179, 0.03);
        border: 1px solid rgba(245, 222, 179, 0.1);
        padding: 4px;
        min-height: 50px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        border-radius: 4px;
        font-size: 0.7em;
        transition: all 0.2s;
    }

    .calendar-day:active {
        background: rgba(245, 222, 179, 0.15);
        border-color: rgba(245, 222, 179, 0.3);
    }

    .calendar-day.day-name {
        background: rgba(245, 222, 179, 0.08);
        border: 1px solid rgba(245, 222, 179, 0.15);
        padding: 2px;
        min-height: auto;
        font-weight: bold;
        font-size: 0.65em;
    }

    .calendar-day .day-number {
        font-size: 0.85em;
        font-weight: bold;
        line-height: 1.2;
    }

    .calendar-day .pnl {
        font-size: 0.7em;
        margin-top: 2px;
        font-weight: 600;
    }

    /* Sidebar - Card Stack Layout */
    .sidebar {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
        overflow-y: visible;
        padding-bottom: 8px;
    }

    /* PnL Summary Card - displayed first on mobile */
    .pnl-summary-container {
        order: -2;
        width: 100%;
        padding: 12px 10px;
        background: rgba(245, 222, 179, 0.03);
        border: none;
        border-bottom: 1px solid rgba(245, 222, 179, 0.12);
        border-radius: 0;
        margin: 0;
    }

    .pnl-summary-container h2 {
        font-size: 0.95em;
        margin: 0 0 10px 0;
        padding-bottom: 6px;
    }

    .pnl-summary {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .pnl-summary .summary-item {
        background: rgba(245, 222, 179, 0.06);
        border: 1px solid rgba(245, 222, 179, 0.12);
        padding: 10px;
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 0;
        transition: all 0.2s;
    }

    .pnl-summary .summary-item:active {
        background: rgba(245, 222, 179, 0.1);
    }

    .pnl-summary h3 {
        margin: 0;
        font-size: 0.75em;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.6);
        line-height: 1.2;
    }

    .pnl-summary p {
        margin: 0;
        font-size: 1em;
        font-weight: 700;
        color: #f5deb3;
    }

    .balance-item {
        grid-column: 1 / -1 !important;
        background: rgba(245, 222, 179, 0.1) !important;
        border: 2px solid rgba(245, 222, 179, 0.25) !important;
    }

    .balance-item p {
        font-size: 1.3em !important;
    }

    .view-chart-btn {
        width: 100% !important;
        margin-top: 10px !important;
        margin-bottom: 0 !important;
        padding: 9px !important;
        font-size: 0.85em !important;
    }

    /* Trade Entry Form Card */
    .trade-entry-container {
        order: -1;
        width: 100%;
        padding: 12px 10px;
        background: rgba(245, 222, 179, 0.03);
        border: none;
        border-bottom: 1px solid rgba(245, 222, 179, 0.12);
        border-radius: 0;
        margin: 0;
    }

    .trade-entry-container h2 {
        font-size: 0.95em;
        margin: 0 0 10px 0;
        padding-bottom: 6px;
    }

    .form-group {
        margin-bottom: 9px;
    }

    .form-group label {
        font-size: 0.85em;
        margin-bottom: 3px;
        color: rgba(245, 222, 179, 0.9);
    }

    .form-group input {
        width: 100%;
        font-size: 0.9em;
        padding: 7px;
        border: 1px solid rgba(245, 222, 179, 0.2);
        background: rgba(245, 222, 179, 0.04);
        border-radius: 6px;
        color: #fff;
    }

    .form-group input:focus {
        outline: none;
        border-color: rgba(245, 222, 179, 0.5);
        background: rgba(245, 222, 179, 0.08);
    }

    .date-input-wrapper {
        display: flex;
        gap: 4px;
        align-items: center;
    }

    .date-input-wrapper input {
        flex: 1;
    }

    .today-btn {
        padding: 5px 8px;
        font-size: 0.8em;
        white-space: nowrap;
    }

    #trade-form button {
        width: 100%;
        font-size: 0.9em;
        padding: 9px;
        margin-top: 5px;
    }

    /* Modal Styles */
    .modal {
        z-index: 50;
    }

    .modal-content {
        width: 92%;
        max-width: none;
        margin: 25% auto;
        border-radius: 12px;
    }

    .trade-modal-content {
        max-width: 92vw;
    }

    .trade-modal-header h3 {
        font-size: 1em;
    }

    .trade-modal-body {
        max-height: 60vh;
        font-size: 0.88em;
        padding: 15px;
    }

    #modal-trades-list div {
        padding: 10px;
        margin-bottom: 8px;
        font-size: 0.88em;
    }

    .trade-item {
        gap: 8px;
    }

    .delete-trade-btn {
        padding: 5px 8px;
        font-size: 0.85em;
        min-width: 24px;
    }

    .summary-modal-content {
        max-width: 92vw;
    }

    .summary-details {
        min-height: 280px;
    }

    .card-header {
        padding: 10px;
        font-size: 0.9em;
    }

    .card-period {
        top: 10px;
        right: 10px;
    }

    .card-period span {
        font-size: 0.8em;
    }

    .card-content {
        padding-left: 10px;
        padding-bottom: 10px;
        gap: 5px;
    }

    .card-row span {
        font-size: 0.85em;
    }

    .card-row.earnings p {
        font-size: 2.2em;
        letter-spacing: 1px;
    }

    /* Footer hidden on mobile */
    .dashboard-footer {
        display: none;
    }

    /* Chart Modal */
    .chart-modal-content {
        max-width: 92vw;
        max-height: 85vh;
    }

    .chart-modal-header {
        padding: 12px;
    }

    .chart-modal-header h2 {
        font-size: 1.1em;
    }

    .chart-modal-body {
        padding: 12px;
        gap: 15px;
    }

    .chart-settings {
        padding: 12px;
    }

    .settings-group {
        flex-direction: column;
        gap: 10px;
    }

    .setting-item {
        min-width: auto;
        flex: 1 1 auto;
    }

    .setting-item label {
        font-size: 0.85em;
    }

    .setting-item input {
        font-size: 0.9em;
        padding: 7px;
    }

    .update-limits-btn {
        width: 100% !important;
        min-width: auto !important;
        padding: 9px !important;
        font-size: 0.9em !important;
    }

    .chart-container {
        min-height: 300px;
        padding: 12px;
    }

    /* Scrolling improvements */
    .dashboard-main {
        -webkit-overflow-scrolling: touch;
    }
}

