/**
 * Investment Admin Dashboard Complete Styles
 * Save this as: shortcode-style.css
 */

/* ==================== GLOBAL STYLES ==================== */

.investment-admin-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.dashboard-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

/* ==================== MESSAGES ==================== */

.investment-error,
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #f5c6cb;
    margin-bottom: 20px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #c3e6cb;
    margin-bottom: 20px;
}

/* ==================== STATISTICS CARDS ==================== */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 48px;
    line-height: 1;
}

.stat-content h3 {
    margin: 0 0 5px 0;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

.stat-content p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.stat-primary { border-left: 4px solid #3498db; }
.stat-success { border-left: 4px solid #2ecc71; }
.stat-info { border-left: 4px solid #9b59b6; }
.stat-warning { border-left: 4px solid #f39c12; }

/* ==================== QUICK LINKS ==================== */

.quick-links {
    margin-bottom: 30px;
}

.quick-links h2 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quick-link-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.quick-link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #3498db;
}

.link-icon {
    font-size: 32px;
}

.link-text {
    font-weight: 600;
    font-size: 14px;
}

/* ==================== DASHBOARD GRID ==================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* ==================== DASHBOARD CARD ==================== */

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.dashboard-card h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.card-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

/* ==================== FILTERS ==================== */

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
}

.table-search {
    display: flex;
    gap: 10px;
}

.search-input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 250px;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

/* ==================== INVESTMENT TYPES ==================== */

.investment-types {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.type-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.type-label {
    font-weight: 600;
    color: #2c3e50;
}

.type-badge {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.type-badge.badge-secondary {
    background: #9b59b6;
}

.type-amount {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 10px;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill-secondary {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
}

/* ==================== PROPERTIES SUMMARY ==================== */

.properties-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-label {
    color: #7f8c8d;
    font-weight: 500;
}

.summary-value {
    font-weight: 700;
    font-size: 20px;
    color: #2c3e50;
}

.text-success { color: #27ae60 !important; }
.text-danger { color: #e74c3c !important; }
.text-warning { color: #f39c12 !important; }
.text-muted { color: #95a5a6 !important; }
.text-primary { color: #3498db !important; }

/* ==================== TABLE STYLES ==================== */

.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.investment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
}

.investment-table thead {
    background: #34495e;
    color: white;
}

.investment-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

.investment-table th:hover {
    background: #2c3e50;
}

.investment-table th.sort-asc::after {
    content: ' ▲';
    font-size: 10px;
}

.investment-table th.sort-desc::after {
    content: ' ▼';
    font-size: 10px;
}

.investment-table td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
}

.investment-table tbody tr {
    transition: background-color 0.2s ease;
}

.investment-table tbody tr:hover {
    background: #f8f9fa;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-info strong {
    color: #2c3e50;
}

.user-info small {
    color: #7f8c8d;
    font-size: 12px;
}

/* ==================== BADGES ==================== */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: #3498db;
    color: white;
}

.badge-info {
    background: #9b59b6;
    color: white;
}

.badge-success {
    background: #2ecc71;
    color: white;
}

.badge-warning {
    background: #f39c12;
    color: white;
}

.badge-danger {
    background: #e74c3c;
    color: white;
}

/* ==================== STATUS BADGES ==================== */

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-withdrawn {
    background: #f8d7da;
    color: #721c24;
}

.status-cancelled {
    background: #e2e3e5;
    color: #383d41;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-paid {
    background: #cce5ff;
    color: #004085;
}

.status-available {
    background: #d4edda;
    color: #155724;
}

.status-sold {
    background: #f8d7da;
    color: #721c24;
}

.status-reserved {
    background: #fff3cd;
    color: #856404;
}

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-info:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* ==================== FORMS ==================== */

.property-form {
    margin-top: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ==================== MODAL ==================== */

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-content h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

/* ==================== DETAILS ROW ==================== */

.details-row {
    background: #f8f9fa;
}

.details-content {
    padding: 20px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.detail-item {
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.detail-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 5px;
}

/* ==================== LOADING SPINNER ==================== */

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== PRINT STYLES ==================== */

@media print {
    .action-buttons,
    .btn,
    .filter-group,
    .quick-links,
    .form-actions,
    .print-btn {
        display: none !important;
    }
    
    .dashboard-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .investment-table {
        font-size: 10px;
    }
    
    .investment-table th,
    .investment-table td {
        padding: 6px;
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .investment-admin-dashboard {
        padding: 10px;
    }
    
    .dashboard-title {
        font-size: 24px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .properties-summary {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        font-size: 36px;
    }
    
    .stat-content h3 {
        font-size: 24px;
    }
    
    .dashboard-card {
        padding: 15px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select,
    .search-input {
        width: 100%;
    }
    
    .investment-table {
        font-size: 12px;
    }
    
    .investment-table th,
    .investment-table td {
        padding: 8px 6px;
    }
    
    .type-amount {
        font-size: 18px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .dashboard-title {
        font-size: 20px;
    }
    
    .stat-content h3 {
        font-size: 20px;
    }
    
    .investment-table {
        font-size: 10px;
    }
    
    .investment-table th,
    .investment-table td {
        padding: 6px 4px;
    }
}