/*
Theme Name: Debt Manager Theme
Theme URI: https://example.com/debt-manager-theme
Author: ChatGPT
Author URI: https://example.com
Description: Simple, clean, responsive theme optimized for the Debt Manager plugin front-end tables, with dashboard-like layout for PC, tablet, and smartphone.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: debt-manager-theme
*/

:root {
    --dm-bg: #0f172a;
    --dm-bg-soft: #111827;
    --dm-card-bg: #ffffff;
    --dm-card-border: #e5e7eb;
    --dm-accent: #2563eb;
    --dm-accent-soft: rgba(37, 99, 235, 0.1);
    --dm-accent-strong: #1d4ed8;
    --dm-text-main: #0f172a;
    --dm-text-soft: #6b7280;
    --dm-radius-lg: 16px;
    --dm-radius-md: 10px;
    --dm-shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.24);
    --dm-shadow-card: 0 6px 18px rgba(15, 23, 42, 0.18);
    --dm-transition-fast: 0.18s ease-out;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.dm-theme {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: radial-gradient(circle at top left, #1e293b 0, #020617 55%);
    color: var(--dm-text-main);
}

/* Layout */

.site-header {
    background: linear-gradient(135deg, rgba(15,23,42,0.98), rgba(30,64,175,0.95));
    color: #e5e7eb;
    padding: 14px 20px;
    box-shadow: 0 12px 25px rgba(15,23,42,0.45);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
}

.site-branding {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-title {
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.site-title a {
    color: #e5e7eb;
    text-decoration: none;
}

.site-description {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
}

.site-main {
    max-width: 1200px;
    margin: 20px auto 40px auto;
    padding: 0 16px 40px;
}

.site-footer {
    border-top: 1px solid rgba(148,163,184,0.4);
    padding: 14px 16px 24px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    max-width: 1200px;
    margin: 0 auto;
}

/* Content cards */

.dm-card {
    background: radial-gradient(circle at top left, #ffffff 0, #f3f4f6 35%, #e5e7eb 100%);
    border-radius: var(--dm-radius-lg);
    box-shadow: var(--dm-shadow-soft);
    padding: 18px 18px 20px;
    margin: 0 0 22px;
    border: 1px solid rgba(148,163,184,0.4);
}

.dm-card h1,
.dm-card h2,
.dm-card h3 {
    margin-top: 0;
    color: var(--dm-text-main);
}

/* Typography & links */

a {
    color: var(--dm-accent);
}

a:hover {
    color: var(--dm-accent-strong);
}

h1, h2, h3, h4, h5 {
    color: var(--dm-text-main);
}

/* Debt Manager table enhancements */

.dm-table-container {
    background: #ffffff;
    border-radius: var(--dm-radius-lg);
    box-shadow: var(--dm-shadow-card);
    padding: 14px 16px 18px;
    border: 1px solid var(--dm-card-border);
    margin-top: 4px;
}

.dm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 0;
    font-size: 14px;
    background: #ffffff;
}

.dm-table th,
.dm-table td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
}

.dm-table th {
    background: linear-gradient(180deg, #f9fafb, #edf2ff);
    font-weight: 600;
    text-align: center;
    color: #111827;
    white-space: nowrap;
}

.dm-table td {
    text-align: right;
    color: #111827;
}

.dm-table td.text-left {
    text-align: left;
}

.dm-striped tbody tr:nth-child(even) {
    background: #f9fafb;
}

.dm-table tbody tr:hover {
    background: #eef2ff;
}

/* badges for amount columns (if you want to style via additional classes later) */

.dm-badge-overdue {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
    font-size: 11px;
    font-weight: 600;
}

/* Responsive table wrapper */

.dm-table-wrap {
    overflow-x: auto;
    padding-bottom: 6px;
}

/* Post / page content inside card */

.dm-card .entry-title {
    font-size: 22px;
    margin: 0 0 10px;
}

.dm-card .entry-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--dm-text-soft);
}

/* Simple primary button style if Gutenberg or shortcodes use buttons */

.dm-button,
.dm-card .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--dm-accent);
    background: var(--dm-accent);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--dm-transition-fast), transform var(--dm-transition-fast), box-shadow var(--dm-transition-fast);
}

.dm-button:hover,
.dm-card .wp-block-button__link:hover {
    background: var(--dm-accent-strong);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

/* Mobile / tablet responsiveness */

@media (max-width: 1024px) {
    .site-main {
        max-width: 100%;
        margin-top: 16px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 10px 14px;
    }
    .site-main {
        padding: 0 10px 28px;
        margin-bottom: 28px;
    }
    .dm-card {
        padding: 14px 12px 16px;
        border-radius: 12px;
    }
    .dm-table {
        font-size: 12px;
    }
    .dm-table th,
    .dm-table td {
        padding: 6px 8px;
    }
    .site-title {
        font-size: 17px;
    }
    .site-description {
        display: none;
    }
}

/* Tiny screens */

@media (max-width: 480px) {
    .site-main {
        padding: 0 8px 22px;
    }
    .dm-card {
        padding: 12px 10px 14px;
    }
}
