/* 금고 비밀번호 입력 모달 스타일 */
.safetybox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.safetybox-modal.active {
    display: flex;
}

.safetybox-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 320px;
    max-width: 400px;
}

.safetybox-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.safetybox-password-display {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 8px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007bff;
    font-family: 'Courier New', monospace;
}

.safetybox-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    max-width: 280px;
    margin: 0 auto;
}

.safetybox-key {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
}

.safetybox-key:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.safetybox-key:active {
    transform: scale(0.95);
}

.safetybox-key.correct {
    background: #28a745;
}

.safetybox-key.correct:hover {
    background: #1e7e34;
}

.safetybox-key.clear {
    background: #ffc107;
    color: #212529;
}

.safetybox-key.clear:hover {
    background: #e0a800;
}

.safetybox-key.active {
    transform: scale(0.95);
    opacity: 0.8;
}

.safetybox-key.disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.safetybox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.safetybox-close:hover {
    color: #333;
}

.safetybox-password-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.safetybox-dot {
    width: 15px;
    height: 15px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s ease;
}

.safetybox-dot.filled {
    background: #007bff;
    border-color: #007bff;
}

/* 머니 관리 스타일 */
.safetybox-money-container {
    max-width: 450px;
    min-width: 400px;
}

.safetybox-transaction-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

/* 보유 금액 표시 스타일 */
.safetybox-balance-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.balance-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.balance-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    min-width: 80px;
}

.balance-value {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    text-align: right;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* 기본 상태 - 입금이 선택된 상태 */
.safetybox-deposit-btn {
    background: #dc3545;
    color: white;
    flex: 1;
    padding: 15px;
    border: 3px solid #dc3545;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.safetybox-deposit-btn:hover {
    background: #c82333;
    border-color: #c82333;
}

.safetybox-withdraw-btn {
    background: white;
    color: #333;
    flex: 1;
    padding: 15px;
    border: 3px solid #007bff;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.safetybox-withdraw-btn:hover {
    background: #f8f9fa;
}

/* 출금이 선택된 상태 */
.safetybox-deposit-btn.inactive {
    background: white;
    color: #333;
    border: 3px solid #dc3545;
}

.safetybox-deposit-btn.inactive:hover {
    background: #f8f9fa;
}

.safetybox-withdraw-btn.active {
    background: #007bff;
    color: white;
    border: 3px solid #007bff;
}

.safetybox-withdraw-btn.active:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.safetybox-amount-display {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: bold;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.safetybox-amount-display.deposit-mode {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.safetybox-amount-display.withdraw-mode {
    background: rgba(0, 123, 255, 0.1);
    border-color: rgba(0, 123, 255, 0.3);
    color: #007bff;
}

.safetybox-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.safetybox-shortcut-btn {
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.safetybox-shortcut-btn:hover {
    background: #138496;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.safetybox-all-amount-btn {
    background: #fd7e14;
    font-weight: 900;
}

.safetybox-all-amount-btn:hover {
    background: #e8670e;
}

.safetybox-money-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    max-width: 320px;
    margin: 0 auto;
}

.safetybox-money-key {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
}

.safetybox-money-key:hover {
    background: #545b62;
    transform: scale(1.05);
}

.safetybox-money-key:active {
    transform: scale(0.95);
}

.safetybox-money-key.clear {
    background: #ffc107;
    color: #212529;
}

.safetybox-money-key.clear:hover {
    background: #e0a800;
}

.safetybox-money-key.execute {
    background: #28a745;
}

.safetybox-money-key.execute:hover {
    background: #1e7e34;
}

.safetybox-money-key.disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.safetybox-money-key.disabled:hover {
    transform: none;
}

@media (max-width: 480px) {
    .safetybox-container {
        margin: 20px;
        padding: 20px;
        min-width: auto;
    }

    .safetybox-money-container {
        min-width: auto;
        max-width: none;
    }

    .safetybox-keypad,
    .safetybox-money-keypad {
        max-width: 240px;
        gap: 8px;
    }

    .safetybox-key,
    .safetybox-money-key {
        padding: 15px;
        font-size: 18px;
        min-height: 50px;
    }

    .safetybox-shortcuts {
        grid-template-columns: repeat(2, 1fr);
    }

    .safetybox-shortcut-btn {
        padding: 10px 6px;
        font-size: 12px;
    }
}