/* search-order.css - Complete Modern Style */

/* Body Background - White */
body {
    background: #ffffff !important;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    padding-top: 50px;
    padding-bottom: 60px;
}

.main-content {
    background: #ffffff !important;
}

.page-content {
    background: #ffffff !important;
}

/* Search Container */
.search-modern-container {
    background: #ffffff;
    min-height: 100vh;
    padding: 2rem 0;
}

/* Search Header - Centered */
.search-header-modern {
    text-align: center;
    padding: 3rem 2rem 2rem;
    background: transparent;
}

.search-header-modern h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.search-header-modern p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

/* Search Cards Container */
.search-cards-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Search Form Card - White */
.search-form-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.search-form-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #1a1a1a;
    font-size: 0.95rem;
    font-weight: 600;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    color: #1a1a1a;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.btn-search {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    width: 100%;
    margin-top: 16px;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
}

.btn-search i {
    margin-right: 8px;
}

/* Order Tabs */
.order-tabs {
    display: flex;
    gap: 8px;
    max-width: fit-content;
    margin: 0 auto 2rem;
    background: #1B1D1F;
    padding: 8px;
    border-radius: 50px;
    position: relative;
    z-index: 10;
}

.order-tab {
    background: transparent;
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    position: relative;
    white-space: nowrap;
    min-width: auto;
}

.order-tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.order-tab.active {
    background: linear-gradient(135deg, #494b58, #3a3c48);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.order-tab span {
    position: relative;
    z-index: 1;
}

/* Tab Content */
.tab-content-wrapper {
    display: none;
}

.tab-content-wrapper.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Card - Dark for info tab */
.result-card-modern {
    background: #1B1D1F;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #1B1D1F;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 2rem;
}

.result-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    background-image: linear-gradient(180deg, #484A58 0%, #1B1D1F 100%);
}

.result-header-modern {
    padding: 0;
    margin-bottom: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.result-header-modern h3 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
    margin: 0;
}

.result-body-modern {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Info Divider */
.info-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 20%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.3) 80%,
        rgba(255, 255, 255, 0) 100%
    );
    margin: 10px 0;
}

/* Info Group - For dark card */
.info-group {
    margin: 0;
    padding: 0;
    border-bottom: none;
}

.result-card-modern .info-label {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 0.85rem;
    line-height: 1.2;
}

.result-card-modern .info-value {
    font-weight: 500;
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 2px;
}
}

.result-card-modern textarea.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.result-card-modern textarea.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.result-card-modern .badge {
    color: #ffffff;
}

.result-card-modern .order-status,
.result-card-modern .order-package {
    color: #ffffff;
}

/* Share Link Container - White card */
.share-link-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.share-link-container h6 {
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Input Group */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
    flex: 1;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Device Status Box - White card */
.device-status-box {
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.device-status-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.status-badge {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-info {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 12px;
    padding-left: 20px;
    border-left: 3px solid #e9ecef;
}

/* Guide Section - White cards */
.guide-section {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.guide-section a {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-width: 120px;
}

.guide-section a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    text-decoration: none;
    color: #1a1a1a;
}

/* Certificate and Password Sections - White cards */
.certificate-section-white,
.password-section-white {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.certificate-section-white h6,
.password-section-white h6 {
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 1rem;
}

.certificate-section-white .info-label,
.password-section-white .info-label {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
}

.certificate-section-white .info-value,
.password-section-white .info-value {
    color: #1a1a1a;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

.btn-primary-custom {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

.btn-success-custom {
    background: linear-gradient(135deg, #28a745 0%, #20873a 100%);
    color: white;
}

.btn-success-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    color: white;
}

.btn-info-custom {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.btn-info-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
    color: white;
}

.btn-warning-custom {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

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

.btn-danger-custom {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-danger-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
    color: white;
}

/* Form Controls */
.form-control {
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
    color: #1a1a1a;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.form-control:read-only {
    background: #f8f9fa;
    color: #6c757d;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-primary {
    background-color: #1a1a1a !important;
    color: white;
}

.bg-success {
    background-color: #28a745 !important;
    color: white;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #212529;
}

.bg-danger {
    background-color: #dc3545 !important;
    color: white;
}

.bg-info {
    background-color: #17a2b8 !important;
    color: white;
}

/* Status Icons */
.fa-check-circle { 
    color: #28a745;
}

.fa-cog { 
    color: #17a2b8;
}

.fa-exclamation-triangle { 
    color: #dc3545;
}

.fa-clock { 
    color: #ffc107;
}

.fa-minus-circle { 
    color: #6c757d;
}

.fa-spin {
    animation: fa-spin 1.5s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(359deg); }
}

/* Modal Styles */
.modal-custom .modal-content {
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border: none;
}

.modal-custom .modal-body {
    padding: 32px;
}

.modal-custom .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left-color: #ff9500;
}

.alert-info {
    background: #e3f2fd;
    color: #0d47a1;
    border-left-color: #2196f3;
}

.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border-left-color: #4caf50;
}

.alert-danger {
    background: #ffebee;
    color: #b71c1c;
    border-left-color: #f44336;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: #1a1a1a !important; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-muted { color: #6c757d !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.ms-2 { margin-left: 8px; }
.d-block { display: block; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.w-100 { width: 100%; }

/* Row & Col */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.row > * {
    padding: 0 0.75rem;
}

.col-lg-3 {
    width: 25%;
}

.col-lg-9 {
    width: 75%;
}

/* Responsive */
@media (max-width: 768px) {
    .search-modern-container {
        padding: 1rem 0;
    }

    .search-header-modern {
        padding: 2rem 1rem 1.5rem;
    }

    .search-header-modern h1 {
        font-size: 1.5rem;
    }

    .search-header-modern p {
        font-size: 0.9rem;
    }

    .search-cards-container {
        padding: 0 0.5rem;
    }

    .search-form-card {
        padding: 1.5rem;
    }

    .result-card-modern {
        padding: 24px 16px;
    }

    .result-header-modern h3 {
        font-size: 20px;
    }

    .order-tabs {
        max-width: fit-content;
        padding: 6px;
        gap: 6px;
    }
    
    .order-tab {
        padding: 10px 24px;
        font-size: 0.9rem;
        min-width: auto;
    }

    .guide-section {
        flex-direction: column;
        gap: 8px;
    }

    .guide-section a {
        min-width: 100%;
        padding: 12px;
        font-size: 0.85rem;
    }

    .info-group {
        margin-bottom: 16px;
    }

    .device-status-box {
        padding: 16px;
    }

    .status-badge {
        font-size: 13px;
    }

    .status-info {
        font-size: 12px;
        padding-left: 16px;
    }

    .col-lg-3,
    .col-lg-9 {
        width: 100%;
        margin-bottom: 12px;
    }

    .input-group {
        flex-direction: column;
        gap: 8px;
    }

    .input-group .form-control {
        border-radius: 8px !important;
        border: 2px solid #e9ecef !important;
    }

    .input-group .btn {
        border-radius: 8px !important;
    }
}

@media (max-width: 480px) {
    .search-form-card {
        padding: 1rem;
    }

    .result-card-modern {
        padding: 20px 12px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Share Link Button - One line */
.share-link-button-container {
    margin-bottom: 1.5rem;
}

.share-link-button-container .btn {
    padding: 14px 24px;
    font-size: 1rem;
}

/* Password Row inside Certificate */
.password-row {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Sign Buttons Section */
.sign-buttons-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sign-buttons-section h6 {
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 1rem;
}

.app-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.sign-app-btn {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.sign-app-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
}

.sign-app-btn i {
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .app-buttons-grid {
        grid-template-columns: repeat(2, 1fr);  /* Mobile cũng 2 cột */
        gap: 10px;  /* Gap nhỏ hơn trên mobile */
    }
    
    .sign-app-btn {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
    
    .sign-app-btn i {
        font-size: 0.85rem;
    }
}

/* Ultra Compact Info Row */
.result-card-modern .info-group .row {
    margin: 0;
}

.result-card-modern .info-group .col-lg-3,
.result-card-modern .info-group .col-lg-9 {
    padding-top: 2px;
    padding-bottom: 2px;
}

/* Textarea compact */
.result-card-modern .info-group textarea {
    margin-top: 0;
    margin-bottom: 0;
    padding: 8px 12px;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Badge compact */
.result-card-modern .badge {
    font-size: 0.75rem;
    padding: 3px 8px;
}