/* ==========================================================================
   Modern Minimalist Design System (Responsive Mobile & Desktop)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fee2e2;

    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #edf2f7;
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    
    --text-heading: #0f172a;
    --text-body: #475569;
    --text-muted: #94a3b8;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 22px;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-heading);
    min-height: 100vh;
    padding: 24px 16px 60px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-font-smoothing: antialiased;
}

/* App Wrapper: Responsive Mobile & Desktop Layout */
.app-wrapper {
    width: 100%;
    max-width: 500px; /* Default sleek mobile view */
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: max-width 0.3s ease;
}

/* When viewing on tablet & desktop */
@media (min-width: 860px) {
    .app-wrapper {
        max-width: 900px; /* Expands into clean desktop layout */
    }
    
    .desktop-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* ==========================================================================
   Header Card
   ========================================================================== */
.clean-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    padding: 24px;
    position: relative;
    width: 100%;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.building-icon {
    width: 36px;
    height: 36px;
    background: #eef2ff;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: #4f46e5;
}

.company-name {
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.main-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 6px;
}

.main-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 20px;
}

/* Header Action Buttons */
.action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-new-attachment {
    flex: 1;
    background: #4f46e5;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
}

.btn-new-attachment:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.btn-icon-action {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-icon-action:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.btn-register-action {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 0 16px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-register-action:hover {
    background: #f8fafc;
    color: #4f46e5;
    border-color: #cbd5e1;
}

/* Search Bar */
.search-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    padding: 4px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.search-icon {
    font-size: 16px;
    color: #94a3b8;
}

.search-input {
    border: none;
    outline: none;
    font-size: 0.92rem;
    color: #0f172a;
    width: 100%;
    padding: 12px 0;
    font-family: inherit;
    background: transparent;
}

.search-input::placeholder {
    color: #94a3b8;
}

/* ==========================================================================
   Attachment Cards
   ========================================================================== */
.attachment-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.attachment-card:hover {
    box-shadow: 0 8px 24px -4px rgba(0,0,0,0.06);
}

.card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.customer-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-right: 4px;
}

.info-tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: monospace;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #64748b;
}

.card-meta .meta-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.meta-divider {
    color: #cbd5e1;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 12px;
    border-top: 1px dashed #f1f5f9;
}

.amount-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.amount-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}

.amount-value span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin-left: 3px;
}

/* Card Actions */
.card-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-view-print {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-view-print:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #4f46e5;
}

.btn-delete-icon {
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid #fee2e2;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
}

.btn-delete-icon:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.btn-edit-icon {
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
}

.btn-edit-icon:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Bottom Profile / User Footer */
.user-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 4px;
    font-size: 0.82rem;
    color: #94a3b8;
}

.profile-circle {
    width: 32px;
    height: 32px;
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
