* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #2c3e50;
    color: #fff;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #34495e;
}

.mobile-menu-toggle {
    display: none;
}

.user-name {
    font-size: 1.2rem;
    margin-bottom: 5px;
    cursor: pointer;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-item:hover {
    background: #34495e;
}

.nav-item.active {
    background: #3498db;
}

.nav-item i {
    margin-right: 10px;
}

.main-content {
    flex: 1;
    padding: 15px;
    background: #f5f7fa;
}

.welcome-section {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    width: 100%;
}

.welcome-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.welcome-text {
    color: #7f8c8d;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .sidebar-header {
        padding: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: none;
    }

    .mobile-menu-toggle {
        display: block;
        font-size: 1.5rem;
        background: 0 0;
        border: 0;
        cursor: pointer;
        color: #fff;
        padding: 0.5rem;
    }

    .nav-item,
    .nav-menu {
        border-top: 1px solid #34495e;
    }

    .nav-menu {
        display: none;
        padding: 0;
    }

    .nav-menu.active {
        display: block;
    }

    .nav-item {
        padding: 12px 20px;
    }
}

.content-section {
    display: none;
    width: 100%;
}

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

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.software-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.status-tag {
    position: absolute;
    top: 15px;
    right: -35px;
    padding: 8px 40px;
    font-size: 0.85rem;
    transform: rotate(45deg);
    text-align: center;
    width: 150px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-active {
    background: #4caf50;
    color: #fff;
}

.status-inactive {
    background: gray;
    color: #fff;
}

.status-expired {
    background: #f44336;
    color: #fff;
}

.software-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-right: 40px;
}

.software-icon {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: #f8f9fa;
    border-radius: 8px;
}

.software-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.software-info .info-item {
    margin-bottom: 12px;
}

.purchase-details li:last-child,
.software-info .info-item:last-child {
    margin-bottom: 0;
}

.software-info .info-value {
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-info {
    margin-top: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.profile-info .info-item {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.profile-info .info-item:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

.profile-info .info-label {
    color: #718096;
    font-weight: 500;
    font-size: 1rem;
    flex: 0 0 120px;
}

.profile-info .info-value {
    color: #2d3748;
    font-weight: 600;
    font-size: 1rem;
    text-align: right;
    word-break: break-all;
}

.profile-info .info-value.verified {
    color: #38a169;
}

.profile-info .info-value.unverified {
    color: #e53e3e;
}

.profile-info .info-value.normal {
    color: #3182ce;
}

.profile-info .info-value.pending {
    color: #cea431;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 0;
    background: #f1f1f1;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

.modal-header {
    flex-shrink: 0;
}

.modal-header .software-info {
    margin-top: 15px;
    color: #666;
}

.modal-header .software-description {
    margin-top: 10px;
    color: #666;
    line-height: 1.5;
}

.purchase-details {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.purchase-details h3 {
    margin: 0 0 15px;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.purchase-details h3:before {
    content: '📝';
    margin-right: 8px;
    font-size: 1.1em;
}

.purchase-details pre {
    margin: 0;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    white-space: pre-wrap;
    color: #4a5568;
    line-height: 1.6;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
}

.purchase-details ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
    line-height: 1.6;
}

.purchase-details li {
    margin-bottom: 8px;
}

.duration-options {
    grid-template-columns: repeat(4, 1fr);
    margin: 20px 0;
    flex-shrink: 0;
}

.purchase-total {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.total-label {
    font-size: 1.1rem;
    color: #2c3e50;
}

.total-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e74c3c;
}

.action-button,
.form-input {
    width: 100%;
    border-radius: 5px;
    font-size: 1rem;
}

.action-button {
    padding: 1rem;
    border: 0;
    cursor: pointer;
    transition: background 0.3s;
    background: #3498db;
    color: #fff;
    flex-shrink: 0;
    margin-top: 20px;
}

.action-button:hover {
    background: #2980b9;
}

.form-input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: 0;
    border-color: #4a90e2;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

.captcha-container input {
    flex: 1;
    min-width: 120px;
    max-width: 200px;
    text-align: center;
    letter-spacing: 2px;
    font-size: 1.2rem;
}

.captcha-image,
.captcha-loading {
    cursor: pointer;
    transition: transform 0.2s;
    height: 40px;
    width: 100px;
    object-fit: contain;
    margin-left: auto;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: #fff;
}

.captcha-image:hover {
    transform: scale(1.05);
}

.form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
}

.error {
    color: #f44;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.button-group {
    margin-top: 2rem;
}

.submit-btn {
    padding: 1rem;
    border: 0;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    background: #4a90e2;
    color: #fff;
    width: 100%;
}

.image-preview {
    width: 100%;
    max-width: 300px;
    height: 160px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.image-preview:hover {
    border-color: #4a90e2;
    background: #f1f7fb;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    display: none;
    object-fit: contain;
}

.image-preview span {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .duration-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .software-info {
        margin-top: 10px;
    }

    .software-description,
    .software-info {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .purchase-details {
        margin: 15px 0;
        padding: 12px;
    }

    .purchase-details h3 {
        font-size: 1.1rem;
    }

    .purchase-details ul {
        padding-left: 15px;
    }

    .purchase-details li {
        margin-bottom: 6px;
        line-height: 1.4;
        font-size: 0.95rem;
    }

    .duration-option {
        padding: 12px;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
        align-items: center;
    }

    .duration-option > div:first-child {
        font-size: 1rem;
        text-align: left;
    }

    .duration-price {
        font-size: 1.1rem;
        margin-top: 0;
        text-align: right;
    }

    .duration-discount {
        grid-column: 1/-1;
        text-align: left;
        margin-top: 4px;
    }

    .purchase-total {
        margin: 15px 0;
        padding: 12px;
    }

    .total-label {
        font-size: 1rem;
    }

    .total-price {
        font-size: 1.2rem;
    }

    .action-button {
        margin-top: 15px;
        padding: 0.8rem;
        font-size: 0.95rem;
    }
}

.modal-content {
    word-break: break-word;
    hyphens: auto;
}

.purchase-details li,
.software-info div {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.software-description {
    hyphens: auto;
}

.duration-option {
    gap: 8px;
}

.duration-option > div:first-child {
    font-weight: 500;
    color: #2c3e50;
}

.duration-discount {
    color: #e74c3c;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .software-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 15px;
    }

    .software-card {
        padding: 15px;
    }

    .software-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .software-info {
        margin-top: 12px;
        padding-top: 12px;
    }

    .software-info .info-item {
        margin-bottom: 10px;
    }

    .software-info .info-value {
        min-height: auto;
        word-break: break-word;
    }

    .status-tag {
        font-size: 0.8rem;
        padding: 6px 30px;
    }

    .action-button {
        padding: 0.7rem;
        font-size: 0.95rem;
    }
}

.software-description,
.software-header h3,
.software-info .info-value {
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.instructions-section {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.instructions-section h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.instructions-section pre {
    white-space: pre-wrap;
    font-family: inherit;
    color: #34495e;
    line-height: 1.5;
    margin: 0;
}

.instructions-content {
    margin-top: 10px;
    white-space: pre-wrap;
    color: #666;
    line-height: 1.6;
}

.pricing-plan {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    position: relative;
}

.pricing-plan .remove-plan {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #f44;
    color: #fff;
    border: 0;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pricing-plan,
.pricing-plan .form-group {
    margin-bottom: 10px;
}

.pricing-plan .form-group:last-child {
    margin-bottom: 0;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #2c3e50;
}

.modal-header .close {
    font-size: 24px;
    color: #666;
    cursor: pointer;
    background: 0 0;
    border: 0;
    padding: 5px;
    line-height: 1;
}

.modal-body,
.modal-header {
    margin-bottom: 20px;
}

.duration-section {
    margin: 20px 0;
}

.duration-section h3,
.payment-methods h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.duration-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.duration-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.duration-option:hover {
    border-color: #3498db;
    background: #f1f7fb;
}

.duration-option.selected {
    border-color: #3498db;
    background: #ebf5fc;
}

.duration-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 8px;
}

.payment-section {
    margin: 20px 0;
    padding: 0;
}

.payment-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-footer button,
.payment-option {
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option {
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
}

.payment-option:hover {
    border-color: #3498db;
    background: #f1f7fb;
}

.payment-option.selected {
    border-color: #3498db;
    background: #ebf5fc;
}

.payment-option span {
    font-size: 1rem;
    color: #2c3e50;
}

.total-price-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.total-price-section h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

#totalPrice {
    color: #e74c3c;
    font-weight: 700;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modal-footer button {
    padding: 10px 20px;
    border-radius: 5px;
    border: 0;
    font-size: 1rem;
}

.modal-footer button:not(.primary) {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.modal-footer button.primary {
    background: #3498db;
    color: #fff;
}

.modal-footer button:hover:not(.primary) {
    background: #e9ecef;
}

.modal-footer button.primary:hover {
    background: #2980b9;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .duration-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-option {
        flex: 1 1 calc(50% - 8px);
        min-width: 120px;
    }
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.user-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-info {
    margin-bottom: 20px;
}

.user-info .info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.orders-table tr:last-child td,
.user-info .info-item:last-child {
    border-bottom: none;
}

.user-info .info-item strong {
    color: #666;
    min-width: 80px;
}

.user-info .info-value {
    flex: 1;
    text-align: right;
    color: #2c3e50;
}

.user-card .action-button {
    margin-top: 0;
    padding: 8px 15px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .user-grid {
        grid-template-columns: 1fr;
    }

    .user-card {
        margin-bottom: 15px;
    }
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    table-layout: fixed;
}

.orders-table td,
.orders-table th {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    word-break: break-word;
}

.orders-table th:nth-child(1),
.orders-table th:nth-child(2) {
    width: 20%;
}

.orders-table th:nth-child(3) {
    width: 10%;
}

.orders-table th:nth-child(4) {
    width: 20%;
}

.orders-table th:nth-child(5) {
    width: 10%;
}

.orders-table th:nth-child(6) {
    width: 20%;
}

.orders-table th {
    font-weight: 600;
    color: #2c3e50;
}

.orders-table th,
.orders-table tr:hover {
    background-color: #f8f9fa;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 5px;
}

.pagination button {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #007bff;
    padding: 8px 12px;
    margin: 0 2px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.pagination button:hover {
    background-color: #e9ecef;
}

.pagination button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination button:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 8px 12px;
    margin: 0 2px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

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

.order-status-expired {
    background: #f8d7da;
    color: #721c24;
}

.order-status-completed {
    background: #d4edda;
    color: #155724;
}

.order-action-btn {
    padding: 6px 8px;
    border-radius: 4px;
    border: 0;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.btn-cancel {
    background: #dc3545;
    color: #fff;
}

.btn-pay {
    background: #28a745;
    color: #fff;
}

.btn-cancel:hover {
    background: #c82333;
}

.btn-pay:hover {
    background: #218838;
}

@media screen and (max-width: 768px) {
    .orders-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .orders-table td,
    .orders-table th {
        padding: 8px;
        font-size: 0.9em;
        white-space: nowrap;
    }

    .orders-table td:nth-child(4),
    .orders-table th:nth-child(4) {
        display: none;
    }

    .orders-table td:nth-child(5),
    .orders-table th:nth-child(5) {
        min-width: 80px;
    }

    .orders-table td:nth-child(6),
    .orders-table th:nth-child(6) {
        min-width: 180px;
    }

    .order-action-btn {
        padding: 4px 6px;
        font-size: 0.8em;
    }

    .order-actions {
        gap: 4px;
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .order-status {
        white-space: nowrap;
        min-width: 60px;
    }
}

.payment-status-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.payment-status-dialog {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.payment-status-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 1.5rem;
    gap: 1rem;
}

.status-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.status-button.problem {
    background-color: #ff4d4d;
    color: white;
}

.status-button.success {
    background-color: #4caf50;
    color: white;
}

.status-button:hover {
    opacity: 0.9;
}

.action-button.primary {
    flex: 2;
    background-color: #1890ff;
    color: white;
}

.action-button.free {
    flex: 2;
    background-color: #066b12;
    color: white;
}

.action-button.primary:hover {
    background-color: #40a9ff;
}

.action-button.secondary {
    flex: 1;
    background-color: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.action-button.secondary:hover {
    background-color: #bae7ff;
    border-color: #69c0ff;
}

/* Order Cards Styles */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.order-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.order-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

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

.order-software {
    font-weight: 600;
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

.order-number {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.order-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e74c3c;
}

.order-card-body {
    flex: 1;
}

.order-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eee;
}

.order-info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.order-info-label {
    color: #718096;
    font-weight: 500;
}

.order-info-value {
    color: #2d3748;
    font-weight: 500;
    text-align: right;
}

.order-activation-code {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    border-left: 3px solid #3498db;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-actions {
    display: flex;
    gap: 10px;
}

.order-action-btn {
    padding: 8px 12px;
    border-radius: 4px;
    border: 0;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    text-align: center;
    flex: 1;
}

.btn-copy {
    background: #17a2b8;
    color: #fff;
}

.btn-copy:hover {
    background: #138496;
}

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

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

.btn-view {
    background: #6c757d;
    color: #fff;
}

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

.btn-edit {
    background: #ffc107;
    color: #212529;
}

.btn-edit:hover {
    background: #e0a800;
}

@media (max-width: 768px) {
    .orders-grid {
        grid-template-columns: 1fr;
    }

    .order-card {
        padding: 15px;
    }
}

/* Search Container Styles */
.search-container {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.search-box {
    display: flex;
    flex: 1;
    min-width: 250px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.search-button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: #2980b9;
}

.reset-button {
    padding: 10px 15px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.reset-button:hover {
    background: #c0392b;
}

.search-filters {
    display: flex;
    gap: 10px;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 0.9rem;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
}

.no-orders {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        width: 100%;
    }

    .search-filters {
        width: 100%;
        justify-content: space-between;
    }

    .filter-select {
        flex: 1;
    }

    .no-orders {
        padding: 20px;
    }
}

/* Add to dashboard.css */
.user-coupons-section {
    margin-top: 2rem;
}

.coupon-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.coupon-card {
    display: flex;
    background: linear-gradient(135deg, #f5f7fa 0%, #e3e9f2 100%);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.coupon-card::before {
    content: '';
    position: absolute;
    left: 25%;
    top: 0;
    width: 1px;
    height: 100%;
    border-left: 2px dashed #b0bec5;
}

.coupon-value {
    width: 25%;
    padding: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #e91e63;
    background: rgba(233, 30, 99, 0.1);
}

.coupon-details {
    width: 45%;
    padding: 1rem;
}

.coupon-description {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.coupon-condition {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.coupon-expiry {
    font-size: 0.8rem;
    color: #999;
}

.coupon-code {
    width: 30%;
    padding: 1rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.code-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.code-value {
    font-weight: bold;
    color: #3f51b5;
    word-break: break-all;
}

.no-coupons {
    text-align: center;
    color: #666;
    padding: 2rem;
    background: #f5f5f5;
    border-radius: 8px;
}

/* Coupon management styles */
.coupons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.coupon-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.coupon-card-header {
    padding: 15px;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.coupon-code {
    font-weight: bold;
    font-size: 1.2rem;
    color: #2c3e50;
}

.coupon-type {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 5px;
}

.coupon-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
    background-color: #e0e0e0;
    color: #555;
}

.public-coupon {
    background-color: #3498db;
    color: white;
}

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

.coupon-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px dashed #f0f0f0;
    padding-bottom: 10px;
}

.coupon-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.coupon-info-label {
    font-weight: bold;
    color: #555;
}

.coupon-info-value {
    color: #333;
}

.coupon-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.coupon-status-active {
    background-color: #27ae60;
    color: white;
}

.coupon-status-used {
    background-color: #7f8c8d;
    color: white;
}

.coupon-status-expired {
    background-color: #e74c3c;
    color: white;
}

.coupon-actions {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.coupon-action-btn {
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

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

.btn-delete:hover {
    background-color: #c0392b;
}

@media (min-width: 768px) {
    .coupons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .coupons-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.no-coupons {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* Statistics styles for admin orders page */
.statistics-container {
    margin: 20px 0;
}

.statistics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.statistics-section {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.statistics-title {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.statistics-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.statistics-card {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.statistics-card:hover {
    transform: translateY(-2px);
}

.statistics-card.revenue {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edd4 100%);
    border-left: 4px solid #27ae60;
}

.statistics-card.orders {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
}

.statistics-card.revenue .stat-value {
    color: #27ae60;
}

.statistics-card.orders .stat-value {
    color: #2196f3;
}

@media (max-width: 768px) {
    .statistics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

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

    .statistics-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .statistics-title {
        font-size: 1.1rem;
    }
}

/* Compact statistics styles */
.compact-statistics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.compact-statistics-section {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.compact-statistics-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.compact-stat-item {
    flex: 1;
    min-width: 80px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
    border-left: 3px solid #3498db;
}

.compact-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 2px;
}

.compact-stat-value {
    display: block;
    font-size: 0.9rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Monthly revenue table styles */
.monthly-revenue-section {
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.monthly-table {
    overflow-x: auto;
    margin-top: 10px;
}

.monthly-revenue-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 400px;
    margin: 0 auto;
}

.monthly-revenue-table td {
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.monthly-revenue-table .month-label {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    text-align: left;
    width: 40%;
}

.monthly-revenue-table .revenue-value {
    background: #fff;
    font-weight: 600;
    color: #27ae60;
    text-align: right;
    width: 60%;
}

.monthly-revenue-table tr:nth-child(even) .month-label {
    background: #f1f3f4;
}

.monthly-revenue-table tr:hover .month-label {
    background: #e3f2fd;
}

.monthly-revenue-table tr:hover .revenue-value {
    background: #f1f8e9;
}

/* Software sales statistics styles */
.software-sales-section {
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.software-sales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.software-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.software-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.software-header {
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.software-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.software-totals {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    font-size: 0.9rem;
    margin-top: 8px;
}

.total-count {
    color: #007bff;
    font-weight: 600;
    padding: 4px 8px;
    background: #e7f3ff;
    border-radius: 4px;
}

.total-revenue {
    color: #27ae60;
    font-weight: 600;
    padding: 4px 8px;
    background: #e8f5e9;
    border-radius: 4px;
}

.plans-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-item {
    background: #fff;
    border-radius: 4px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #007bff;
}

.plan-label {
    font-size: 0.85rem;
    color: #495057;
    font-weight: 500;
    flex: 1;
}

.plan-stats {
    display: flex;
    gap: 15px;
    align-items: center;
}

.plan-count {
    font-size: 0.85rem;
    color: #007bff;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

.plan-revenue {
    font-size: 0.85rem;
    color: #27ae60;
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

/* Statistics page styles */
.time-range-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.time-range-selector label {
    font-weight: 600;
    color: #2c3e50;
}

#customDateRange {
    display: flex;
    gap: 10px;
    align-items: center;
}

.statistics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.statistics-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.statistics-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.stat-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 6px;
}

.stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #007bff;
}

@media (max-width: 768px) {
    .compact-statistics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .compact-statistics-cards {
        flex-direction: column;
        gap: 6px;
    }

    .compact-stat-item {
        min-width: auto;
        padding: 6px 8px;
    }

    .compact-stat-label {
        font-size: 0.7rem;
    }

    .compact-stat-value {
        font-size: 0.85rem;
    }

    .monthly-revenue-table th,
    .monthly-revenue-table td {
        padding: 6px 8px;
        font-size: 0.8rem;
    }

    .software-sales-grid {
        grid-template-columns: 1fr;
    }

    .software-name {
        font-size: 1rem;
    }

    .software-totals {
        flex-direction: column;
        gap: 4px;
    }

    .plan-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .plan-stats {
        width: 100%;
        justify-content: space-between;
    }

    .statistics-overview {
        grid-template-columns: 1fr;
    }

    .time-range-selector {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}
