@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #fb2d92;
    --primary-soft: rgba(251, 45, 146, 0.1);
    --primary-hover: #e02882;
    --bg-main: #fcfcfd;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #667085;
    --border: #f2f4f7;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-bold: 0 12px 24px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: 0.6s;
}

.nav-link:hover::after {
    left: 100%;
}

.nav-link i {
    font-size: 1.1rem;
}

.nav-link:hover {
    background-color: var(--primary-soft);
    color: var(--primary);
}

.nav-link.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(251, 45, 146, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2.5rem 3.5rem;
}

.header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card {
    background-color: var(--card-bg);
    padding: 1.75rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-bold);
    border-color: var(--primary-soft);
}

.card.static-card:hover {
    transform: none;
}

.card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.card .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Table Design */
.table-container {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background-color: #f9fafb;
    padding: 16px 24px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 0.925rem;
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #fcfcfd;
}

/* Buttons */
.btn {
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 45, 146, 0.25);
}

/* Tags */
.tag {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-paid { 
    background-color: #ecfdf3; 
    color: #027a48; 
}

.tag-partial { 
    background-color: #f2f4f7; 
    color: #344054; 
}

/* Form Styles */
.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

input, select, textarea {
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    padding: 0 16px;
    height: 48px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background-color: white;
    width: 100%;
}

textarea {
    padding: 12px 16px;
    height: auto;
    min-height: 100px;
}

input:focus, select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

/* Modal Base */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 24, 40, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: modalSlideUp 0.3s ease-out;
}

/* Proof Icon */
.proof-btn {
    color: var(--primary);
    background: var(--primary-soft);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.proof-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Image Preview Modal */
#imagePreviewModal .modal-content {
    max-width: 90%;
    width: auto;
    padding: 10px;
    background: transparent;
    box-shadow: none;
}

#previewImage {
    max-height: 85vh;
    max-width: 100%;
    border-radius: 12px;
    display: block;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.close-preview {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}
