/* Dealer Page Styles */

/* Dealer Login Page - Inherit from Admin */
.dealer-login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Dealer Page Layout */
.dealer-page {
    min-height: 100vh;
    background: #f5f7fa;
}

.dealer-header {
    background: #ff6b35;
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.dealer-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.dealer-logo h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.dealer-logo span {
    color: white;
    font-size: 0.9rem;
    opacity: 0.9;
}

.dealer-nav {
    display: flex;
    gap: 5px;
}

.dealer-nav a {
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.dealer-nav a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dealer-nav a.active {
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

.dealer-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dealer-user span {
    font-size: 0.95rem;
}

.dealer-main {
    padding: 40px 0;
}

.dealer-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Section Panels */
.section-panel {
    display: none;
}

.section-panel.active {
    display: block;
}

/* Order Card */
.order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.order-card .card-header {
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 2px solid #e1e4e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-card .card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-text {
    font-size: 0.85rem;
    color: #999;
    font-weight: 400;
}

.order-card .card-body {
    padding: 40px;
}

/* Delivery Type Options */
.delivery-type-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.radio-card {
    cursor: pointer;
}

.radio-card input[type="radio"] {
    display: none;
}

.radio-content {
    padding: 20px;
    border: 2px solid #e1e4e8;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.radio-content i {
    font-size: 2rem;
    color: #999;
    margin-bottom: 10px;
    display: block;
}

.radio-content strong {
    display: block;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 5px;
}

.radio-content span {
    font-size: 0.85rem;
    color: #999;
    display: block;
}

.radio-card input[type="radio"]:checked + .radio-content {
    border-color: #ff6b35;
    background: #fff5f2;
}

.radio-card input[type="radio"]:checked + .radio-content i {
    color: #ff6b35;
}

.radio-card:hover .radio-content {
    border-color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

/* Shipping Details */
.shipping-details {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Quantity Input */
.quantity-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.quantity-input input {
    min-width: 0;
}

.quantity-input select {
    width: 100px;
}

/* Alert Info */
.alert-info {
    padding: 15px 20px;
    background: #e8f4f8;
    border: 1px solid #b8dce8;
    border-radius: 8px;
    color: #1a3a6b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-info i {
    font-size: 1.5rem;
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-item {
    padding: 25px;
    border: 2px solid #e1e4e8;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.order-item:hover {
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
    transform: translateY(-2px);
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e4e8;
}

.order-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.order-date {
    color: #999;
    font-size: 0.9rem;
}

.order-status {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.processing {
    background: #cfe2ff;
    color: #084298;
}

.order-status.shipping {
    background: #d1e7dd;
    color: #0f5132;
}

.order-status.completed {
    background: #d3d3d4;
    color: #41464b;
}

.order-status.cancelled {
    background: #f8d7da;
    color: #842029;
}

.order-item-body {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}

.order-product {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.product-spec {
    color: #666;
    font-size: 0.9rem;
}

.product-quantity {
    color: #999;
    font-size: 0.85rem;
    margin-top: 5px;
}

.order-shipping {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.shipping-label {
    font-size: 0.85rem;
    color: #999;
}

.shipping-value {
    color: #333;
    font-size: 0.95rem;
}

.order-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Order Detail */
.order-detail {
    padding: 20px 0;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e4e8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px 30px;
}

.detail-label {
    font-weight: 600;
    color: #666;
}

.detail-value {
    color: #333;
}

.detail-value.highlight {
    font-weight: 600;
    color: #ff6b35;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
}

.status-badge i {
    font-size: 0.8rem;
}

/* Modal Large */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
}

.modal-lg {
    max-width: 900px;
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid #e1e4e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e1e4e8;
    color: #333;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* 배송지 관리 스타일 */
.saved-addresses {
    margin-bottom: 30px;
}

.saved-addresses h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e4e8;
}

.address-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.address-item {
    background: white;
    border: 2px solid #e1e4e8;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.address-item:hover {
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.address-item.default {
    border-color: #ff6b35;
    background: #fff5f2;
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.address-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-default {
    background: #ff6b35;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.address-actions {
    display: flex;
    gap: 8px;
}

.btn-address-select,
.btn-address-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-address-select {
    background: #ff6b35;
    color: white;
}

.btn-address-select:hover {
    background: #f7931e;
}

.btn-address-delete {
    background: #dc3545;
    color: white;
}

.btn-address-delete:hover {
    background: #c82333;
}

/* Address Form Section */
.address-form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.address-form-section h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.address-form {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #e1e4e8;
}

/* Saved Addresses List */
.saved-addresses-section {
    margin-top: 20px;
}

.saved-addresses-section h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.saved-addresses-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.address-card {
    background: white;
    border: 2px solid #e1e4e8;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.address-card:hover {
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.address-card.default {
    border-color: #ff6b35;
    background: linear-gradient(to right, #fff5f2, white);
    border-left: 5px solid #ff6b35;
}

.address-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.address-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.address-card-body {
    margin-bottom: 15px;
}

.address-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.address-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #666;
    font-size: 0.95rem;
}

.address-info-item i {
    color: #ff6b35;
    margin-top: 3px;
    width: 16px;
}

.address-card-footer {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e1e4e8;
}

.btn-load-address {
    flex: 1;
    background: #ff6b35;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-load-address:hover {
    background: #f7931e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-delete-address {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-address:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.address-info {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.8;
}

.address-info div {
    margin-bottom: 5px;
}

.address-info strong {
    color: #333;
    min-width: 80px;
    display: inline-block;
}

.add-address-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.add-address-section h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.empty-addresses {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-addresses i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-addresses p {
    font-size: 1.1rem;
}

.modal-lg .modal-dialog {
    max-width: 900px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-save-address,
.btn-logout {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #ff6b35;
    color: white;
}

.btn-primary:hover {
    background: #f7931e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-save-address {
    background: #28a745;
    color: white;
}

.btn-save-address:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-warning {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Form Group Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.form-group textarea {
    width: 100%;
    min-height: 500px;
    padding: 25px;
    border: 2px solid #e1e4e8;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 2;
    background: #fafafa;
    resize: vertical;
    transition: all 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.form-group small {
    display: block;
    margin-top: 12px;
    padding: 12px 15px;
    background: #e8f4f8;
    border-left: 4px solid #1a3a6b;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.required {
    color: #ff6b35;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .delivery-type-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dealer-header-content {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }

    .dealer-nav {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }

    .dealer-nav a {
        flex: 1;
        min-width: 100px;
        justify-content: center;
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .order-item-body {
        grid-template-columns: 1fr;
    }

    .order-action {
        justify-content: flex-start;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .detail-label {
        font-size: 0.85rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dealer-container {
        padding: 0 15px;
    }

    .card-body {
        padding: 20px 15px;
    }

    .order-item {
        padding: 15px;
    }

    .radio-content {
        padding: 15px;
    }

    .radio-content i {
        font-size: 1.5rem;
    }

    .radio-content strong {
        font-size: 1rem;
    }
}
