/* Trello-style CSS for CryFur Studios Public Ledger */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
    background: #f4f5f7;
    color: #172b4d;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
.header {
    background: #026aa7;
    color: #ffffff;
    padding: 12px 0;
    border-bottom: 1px solid #055a8c;
}

.header h1 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}

.subtitle {
    color: #ffffff;
    font-size: 14px;
    opacity: 0.9;
}

/* Navigation */
.nav {
    background: #ffffff;
    padding: 12px 0;
    border-bottom: 1px solid #e1e4e8;
    margin-bottom: 16px;
}

.nav .container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 6px 12px;
    background: #091e420a;
    color: #172b4d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: none;
    transition: background 0.1s ease;
}

.nav-btn:hover {
    background: #091e4214;
}

.nav-btn.active {
    background: #0079bf;
    color: #ffffff;
}

.nav-btn.admin-btn {
    background: #172b4d;
    color: #ffffff;
    margin-left: auto;
}

.nav-btn.admin-btn:hover {
    background: #253858;
}

/* Main Content */
main {
    padding: 16px 0 40px;
    flex: 1;
}

/* Section */
.section {
    background: transparent;
    padding: 0;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: #172b4d;
}

/* Filters */
.filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 12px;
    background: #091e420a;
    color: #172b4d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    border: none;
}

.filter-btn:hover {
    background: #091e4214;
}

.filter-btn.active {
    background: #0079bf;
    color: #ffffff;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Card */
.card {
    background: #ffffff;
    border: none;
    box-shadow: 0 1px 0 #091e4221;
    cursor: pointer;
}

.card:hover {
    box-shadow: 0 4px 8px #091e4229;
}

.card-header {
    padding: 12px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.card-header h3 a {
    color: #172b4d;
    text-decoration: none;
}

.card-header h3 a:hover {
    color: #0079bf;
}

.card-body {
    padding: 0 12px 12px;
}

.card-body p {
    margin-bottom: 8px;
    font-size: 13px;
    color: #5e6c84;
}

.card-body p:last-child {
    margin-bottom: 0;
}

.client, .amount {
    font-size: 13px;
    color: #5e6c84;
}

.description, .content {
    color: #172b4d;
    font-size: 13px;
    line-height: 1.5;
}

.card-footer {
    padding: 8px 12px;
    background: transparent;
    border-top: 1px solid #091e420f;
    font-size: 12px;
    color: #5e6c84;
}

.date {
    display: inline-block;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #091e420a;
    font-size: 11px;
    font-weight: 500;
    color: #172b4d;
}

.badge-small {
    display: inline-block;
    padding: 2px 6px;
    background: #091e420a;
    font-size: 11px;
    font-weight: 500;
    color: #172b4d;
}

.status-pending {
    background: #ffd351;
    color: #172b4d;
}

.status-progress {
    background: #0079bf;
    color: #ffffff;
}

.status-completed {
    background: #61bd4f;
    color: #ffffff;
}

.status-cancelled {
    background: #eb5a46;
    color: #ffffff;
}

.status-draft {
    background: #b3bac5;
    color: #ffffff;
}

.status-published {
    background: #61bd4f;
    color: #ffffff;
}

.status-archived {
    background: #b3bac5;
    color: #ffffff;
}

.badge-type {
    background: #c377e0;
    color: #ffffff;
}

/* Detail Page */
.detail-page {
    background: #ffffff;
    padding: 24px;
    box-shadow: 0 1px 0 #091e4221;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #091e420f;
}

.detail-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #172b4d;
    flex: 1;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f4f5f7;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    color: #5e6c84;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.meta-value {
    font-size: 14px;
    color: #172b4d;
    font-weight: 500;
}

.amount-large {
    font-size: 18px;
    color: #172b4d;
    font-weight: 600;
}

.detail-content {
    margin-top: 24px;
}

.detail-content h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #172b4d;
}

.content-text {
    color: #172b4d;
    line-height: 1.6;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    color: #5e6c84;
    font-size: 16px;
    grid-column: 1 / -1;
    background: #ffffff;
    box-shadow: 0 1px 0 #091e4221;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Admin Styles */
.admin-login {
    max-width: 400px;
    margin: 40px auto;
    background: #ffffff;
    padding: 24px;
    box-shadow: 0 1px 0 #091e4221;
}

.admin-login h2 {
    margin-bottom: 16px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #172b4d;
}

.admin-section {
    background: #ffffff;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 0 #091e4221;
}

.admin-section h2 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #172b4d;
    padding-bottom: 12px;
    border-bottom: 1px solid #091e420f;
}

/* Forms */
.form {
    max-width: 800px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 13px;
    color: #5e6c84;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dfe1e6;
    font-size: 14px;
    font-family: inherit;
    background: #fafbfc;
    color: #172b4d;
}

.form-control:focus {
    outline: none;
    border-color: #0079bf;
    background: #ffffff;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    background: #091e420a;
    color: #172b4d;
    transition: background 0.1s ease;
}

.btn-primary {
    background: #0079bf;
    color: #ffffff;
}

.btn-primary:hover {
    background: #026aa7;
}

.btn-secondary {
    background: #091e420a;
    color: #172b4d;
}

.btn-secondary:hover {
    background: #091e4214;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-edit {
    background: #0079bf;
    color: #ffffff;
}

.btn-edit:hover {
    background: #026aa7;
}

.btn-delete {
    background: #eb5a46;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

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

/* Tables */
.admin-table {
    overflow-x: auto;
    margin-top: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #dfe1e6;
}

thead {
    background: #f4f5f7;
}

th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #5e6c84;
    border-bottom: 1px solid #dfe1e6;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #dfe1e6;
    font-size: 13px;
    color: #172b4d;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: #f4f5f7;
}

td.actions {
    white-space: nowrap;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #e3fcef;
    color: #006644;
    border-left: 4px solid #61bd4f;
}

.alert-error {
    background: #ffebe6;
    color: #bf2600;
    border-left: 4px solid #eb5a46;
}

/* Footer */
.footer {
    background: #f4f5f7;
    color: #5e6c84;
    padding: 24px 0;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid #dfe1e6;
}

.footer p {
    color: #5e6c84;
    font-size: 13px;
}

/* Link List */
.link-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.link-btn {
    display: inline-block;
    padding: 10px 16px;
    background: #0079bf;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.1s ease;
    text-align: left;
}

.link-btn:hover {
    background: #026aa7;
}

.link-btn.link-download {
    background: #61bd4f;
}

.link-btn.link-download:hover {
    background: #51a541;
}

.link-btn.link-view {
    background: #0079bf;
}

.link-btn.link-view:hover {
    background: #026aa7;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 16px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .detail-header {
        flex-direction: column;
    }
    
    .detail-header h1 {
        font-size: 18px;
    }
    
    .detail-meta {
        grid-template-columns: 1fr;
    }
    
    .nav .container {
        flex-direction: column;
    }
    
    .nav-btn.admin-btn {
        margin-left: 0;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
}
