/* Centralized shared styles for MiniForening */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

.container {
    display: flex;
    min-height: 100vh;
}

.content {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Section header - can be used for page headers and content sections */
.section-header {
    background: white;
    padding: 15px 30px 12px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.section-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
    line-height: 1.2;
}

.section-subtitle {
    margin: 3px 0 0 0;
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.2;
}

/* Content block - generic white box for content sections */
.content-block {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Reduce padding when content-block only contains h2 */
.content-block:has(h2:only-child) {
    padding-top: 15px;
    padding-bottom: 15px;
}

.content-block h2 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    padding-left: 10px;
    font-size: 18px;
    border-left: 3px solid #3498db;
}

/* If h2 is the only child or last child in content-block, reduce bottom margin */
.content-block h2:only-child,
.content-block h2:last-child {
    margin-bottom: 0px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-card {
    background: #fafafa;
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid #95a5a6;
}

.stat-card-blue {
    border-left-color: #3498db;
}

.stat-card-red {
    border-left-color: #e74c3c;
}

.stat-card-green {
    border-left-color: #27ae60;
}

.stat-card-orange {
    border-left-color: #e67e22;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #95a5a6;
    text-transform: uppercase;
    font-weight: 500;
}

.stat-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-box h3 {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.stat-box .value {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
}

.search-filter-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.search-row input {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.search-row select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.search-row button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.search-row button:hover {
    background: #2980b9;
}

/* Buttons */
button, 
.btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 15px 0 0 0;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
}

button:hover, 
.btn:hover {
    background: #2980b9;
}

button:active, 
.btn:active {
    background: #1f5f8b;
}

button.secondary {
    background: #95a5a6;
}

button.secondary:hover {
    background: #7f8c8d;
}

button.danger,
.btn.danger {
    background: #e74c3c;
}

button.danger:hover,
.btn.danger:hover {
    background: #c0392b;
}

button.small {
    padding: 8px 16px;
    font-size: 14px;
    margin: 0;
}

button.success {
    background: #27ae60;
}

button.success:hover {
    background: #229954;
}

button.warning {
    background: #e67e22;
}

button.warning:hover {
    background: #d35400;
}

.btn-primary {
    background: #27ae60;
    color: white;
}

.btn-primary:hover {
    background: #229954;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-link {
    color: #3498db;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-link:hover {
    background: #ecf0f1;
}

.btn-link-danger { color: #e74c3c !important; border: none !important; background: none !important; cursor: pointer; }

/* Main content area */
.main-content {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group label .required {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
}

.info-box {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
}

.info-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
}

.info-box ul {
    margin-left: 20px;
    color: #555;
}

.info-box ol {
    margin-left: 20px;
    color: #555;
}

.info-box p {
    margin: 10px 0;
}

/* Success and error messages */
.success-message {
    background: #d4edda;
    border-left: 4px solid #27ae60;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #155724;
}

.error-message {
    background: #f8d7da;
    border-left: 4px solid #e74c3c;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #721c24;
}

.warning-message {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #856404;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* Action block - standardized action buttons for overview pages */
.action-block {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.action-block h2 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-left: 10px;
    font-size: 18px;
    border-left: 3px solid #3498db;
}

.action-block .btn,
.action-block button {
    margin: 0 0 10px 0 !important;
    line-height: 1.4;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 15px;
}

.action-block .btn:last-child,
.action-block button:last-child {
    margin-bottom: 0 !important;
}

#hustandInfo {
    display: none;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
}

#hustandInfo h4 {
    margin-bottom: 10px;
    color: #856404;
}

#hustandInfo ul {
    margin-left: 20px;
    color: #856404;
}

/* Generic table styling */
table,
.content-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-collapse: collapse;
}

table th,
.content-table th {
    background: #34495e;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

table td,
.content-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

table tr:hover,
.content-table tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-aktiv {
    background: #d4edda;
    color: #155724;
}

.badge-inaktiv {
    background: #f8d7da;
    color: #721c24;
}

.badge-husstand {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-personlig {
    background: #fff3cd;
    color: #856404;
}

.text-muted { color: #999 !important; }
.text-center { text-align: center !important; }
.padding-large { padding: 30px !important; }
.padding-xlarge { padding: 30px !important; }
.link-inherit { color: inherit !important; }
.no-underline { text-decoration: none !important; }
.width-80 { width: 80px !important; }
.width-100 { width: 100px !important; }
.width-150 { width: 150px !important; }
.width-200 { width: 200px !important; }
.display-inline { display: inline !important; }
.font-24 { font-size: 24px !important; }
.overflow-hidden { overflow: hidden !important; }
.margin-0 { margin: 0 !important; }
.text-right { text-align: right !important; }
.text-center-align { text-align: center !important; }
.font-weight-600 { font-weight: 600 !important; }
.justify-end { justify-content: flex-end !important; }
.flex-gap-8 { display: flex !important; gap: 8px !important; }
.align-self-end { align-self: flex-end !important; }
.bg-light-gray { background-color: #ecf0f1 !important; }
.padding-15 { padding: 15px !important; }
.font-13 { font-size: 13px !important; }
.margin-bottom-15 { margin-bottom: 15px !important; }
.margin-top-10 { margin-top: 10px !important; }
.margin-bottom-20 { margin-bottom: 20px !important; }
.margin-top-20 { margin-top: 20px !important; }
.margin-top-15 { margin-top: 15px !important; }
.margin-top-0 { margin-top: 0 !important; }
.margin-bottom-10 { margin-bottom: 10px !important; }
.margin-right-10 { margin-right: 10px !important; }
.width-100-percent { width: 100% !important; }
.text-decoration-none { text-decoration: none !important; }
.display-block { display: block !important; }
.display-inline-flex { display: inline-flex !important; }
.align-items-center { align-items: center !important; }
.gap-8 { gap: 8px !important; }
.max-height-60vh { max-height: 60vh !important; }
.overflow-hidden-crop { overflow: hidden !important; }
.bg-gray { background: #95a5a6 !important; }
.bg-success { background: #27ae60 !important; }
.pdf-org-name { font-size: 12pt !important; font-weight: bold !important; margin-bottom: 10px !important; }
.pdf-note { font-size: 10pt !important; color: #7f8c8d !important; }
.pdf-footer-note { color: #7f8c8d !important; margin-top: 50mm !important; }
.width-60 { width: 60% !important; }
.width-40 { width: 40% !important; }

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.setting-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.setting-card h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.setting-row {
    margin-bottom: 15px;
    padding-bottom: 30px;
    border-bottom: 1px solid #ecf0f1;
}

.setting-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.setting-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
    margin-bottom: 5px;
}

.setting-value {
    color: #555;
    font-size: 14px;
}

.setting-desc {
    color: #95a5a6;
    font-size: 12px;
    margin-top: 3px;
}

.encrypted-badge {
    display: inline-block;
    background: #e8f4f8;
    color: #3498db;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    margin-left: 15px;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Adgang Cards */
.adgang-card {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

.adgang-card.vigtig {
    border-left: 4px solid #e74c3c;
}

.adgang-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.adgang-navn {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.adgang-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.adgang-actions {
    display: flex;
    gap: 10px;
}

.adgang-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 10px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 3px;
}

.info-value {
    font-size: 14px;
    color: #2c3e50;
    word-break: break-word;
}

.info-value a {
    color: #3498db;
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

.adgang-noter {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 13px;
    color: #555;
    border-left: 3px solid #3498db;
}

.kategori-section {
    margin-bottom: 30px;
}

.kategori-header {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 30px;
    border-bottom: 2px solid #ecf0f1;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .menu {
        width: 100%;
        padding: 15px;
    }
    .menu h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    .menu-btn {
        padding: 12px;
        font-size: 14px;
    }
    .content {
        padding: 15px;
    }
    .main-content {
        padding: 5px;
    }
    .section-header {
        padding: 12px 15px 10px 15px;
    }
    .section-header h1 {
        font-size: 22px;
    }
    .content-block {
        padding: 15px;
    }
    .content-block:has(h2:only-child) {
        padding: 12px 15px;
    }
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
    table {
        font-size: 13px;
    }
    table th, table td,
    .content-table th, .content-table td {
        padding: 8px 6px;
    }
    table th:first-child, table td:first-child,
    .content-table th:first-child, .content-table td:first-child {
        padding-left: 10px;
    }
    table th:last-child, table td:last-child,
    .content-table th:last-child, .content-table td:last-child {
        padding-right: 10px;
    }
}
