/* Association Platform — front-end styling
   A clean, professional, association-grade look. */

:root {
	--ap-navy: #1F3B57;
	--ap-blue: #2E75B6;
	--ap-soft: #D5E8F0;
	--ap-grey: #6B7280;
	--ap-line: #e5e7eb;
	--ap-bg: #f7f9fb;
}

.ap-card {
	max-width: 560px;
	margin: 0 auto 20px;
	background: #fff;
	border: 1px solid var(--ap-line);
	border-radius: 12px;
	padding: 26px 28px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
}

.ap-card h3 {
	margin-top: 0;
	color: var(--ap-navy);
	font-size: 1.35rem;
}

/* Forms */
.ap-form {
	max-width: 460px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid var(--ap-line);
	border-radius: 12px;
	padding: 26px 28px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

.ap-form p { margin: 0 0 16px; }

.ap-form label {
	display: block;
	font-weight: 600;
	color: var(--ap-navy);
	font-size: .95rem;
	margin-bottom: 6px;
}

.ap-form input[type="text"],
.ap-form input[type="email"],
.ap-form input[type="password"],
.ap-form input[type="file"] {
	width: 100%;
	box-sizing: border-box;
	margin-top: 6px;
	padding: 11px 13px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 1rem;
	background: #fff;
}

.ap-form input:focus {
	outline: none;
	border-color: var(--ap-blue);
	box-shadow: 0 0 0 3px rgba(46, 117, 182, .15);
}

/* Buttons */
.ap-btn,
.ap-form button,
.ap-form input[type="submit"] {
	display: inline-block;
	background: var(--ap-blue);
	color: #fff !important;
	border: none;
	border-radius: 8px;
	padding: 11px 22px;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease;
}

.ap-btn:hover,
.ap-form button:hover,
.ap-form input[type="submit"]:hover { background: var(--ap-navy); }

.ap-link { color: var(--ap-blue); text-decoration: none; font-weight: 600; }
.ap-link:hover { text-decoration: underline; }

.ap-muted { color: var(--ap-grey); font-size: .92rem; }

/* Status badge */
.ap-badge {
	display: inline-block;
	color: #fff;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .02em;
	padding: 3px 10px;
	border-radius: 999px;
	vertical-align: middle;
}

/* Notices */
.ap-notice {
	max-width: 560px;
	margin: 0 auto 16px;
	padding: 13px 16px;
	border-radius: 8px;
	border-left: 4px solid var(--ap-blue);
	background: var(--ap-soft);
	color: var(--ap-navy);
	font-size: .95rem;
}
.ap-notice ul { margin: 0; padding-left: 18px; }
.ap-notice-success { background: #e7f6ec; border-left-color: #2E7D32; color: #1e4d26; }
.ap-notice-error { background: #fdeaea; border-left-color: #B91C1C; color: #7f1d1d; }
.ap-notice-info { background: var(--ap-soft); border-left-color: var(--ap-blue); }

/* Bank details block */
.ap-bank {
	background: var(--ap-bg);
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	padding: 14px 16px;
	margin: 12px 0;
}
.ap-bank pre {
	margin: 8px 0 0;
	font-family: inherit;
	white-space: pre-wrap;
	color: #111;
}

/* Tables */
.ap-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
	font-size: .93rem;
}
.ap-table th,
.ap-table td {
	text-align: left;
	padding: 9px 12px;
	border-bottom: 1px solid var(--ap-line);
}
.ap-table th { color: var(--ap-navy); background: var(--ap-bg); }

/* ===================================================================
   Phase 2 — company profiles, products, member directory
   =================================================================== */

/* Wider container for content-heavy screens */
.ap-form-wide { max-width: 720px; }

.ap-req { color: #B91C1C; }

.ap-form textarea {
	width: 100%;
	box-sizing: border-box;
	margin-top: 6px;
	padding: 11px 13px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 1rem;
	font-family: inherit;
	background: #fff;
}
.ap-form textarea:focus {
	outline: none;
	border-color: var(--ap-blue);
	box-shadow: 0 0 0 3px rgba(46, 117, 182, .15);
}

/* Soft/secondary buttons (dashboard tools) */
.ap-btn-soft {
	background: var(--ap-soft);
	color: var(--ap-navy) !important;
}
.ap-btn-soft:hover { background: #bcdcea; }

.ap-tools { margin: 18px 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }

.ap-link-danger { color: #B91C1C; background: none; border: none; cursor: pointer; font: inherit; padding: 0 0 0 8px; }
.ap-link-danger:hover { text-decoration: underline; }

/* Logo / image upload row */
.ap-logo-row { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.ap-logo-preview {
	flex: 0 0 96px;
	width: 96px; height: 96px;
	border: 1px solid var(--ap-line);
	border-radius: 12px;
	background: var(--ap-bg);
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
}
.ap-logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.ap-logo-placeholder { color: var(--ap-grey); font-size: .8rem; }
.ap-logo-field { flex: 1; }

/* Small inline thumbnail in tables */
.ap-thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 8px; }

/* Directory */
.ap-directory { max-width: 1040px; margin: 0 auto; }
.ap-dir-search { display: flex; gap: 8px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.ap-dir-search input[type="search"] {
	flex: 1; min-width: 220px;
	padding: 11px 13px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 1rem;
}
.ap-dir-search input:focus { outline: none; border-color: var(--ap-blue); box-shadow: 0 0 0 3px rgba(46, 117, 182, .15); }

.ap-dir-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
}
.ap-dir-card {
	display: flex; gap: 14px;
	background: #fff;
	border: 1px solid var(--ap-line);
	border-radius: 12px;
	padding: 18px;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
	transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.ap-dir-card:hover {
	box-shadow: 0 6px 18px rgba(16, 24, 40, .10);
	transform: translateY(-2px);
	border-color: var(--ap-soft);
}
.ap-dir-logo {
	flex: 0 0 64px;
	width: 64px; height: 64px;
	border-radius: 10px;
	background: var(--ap-soft);
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
}
.ap-dir-logo img { width: 100%; height: 100%; object-fit: cover; }
.ap-dir-initial { color: var(--ap-navy); font-weight: 700; font-size: 1.6rem; }
.ap-dir-body { flex: 1; min-width: 0; }
.ap-dir-body h4 { margin: 0 0 4px; color: var(--ap-navy); font-size: 1.08rem; }
.ap-dir-cat {
	display: inline-block;
	background: var(--ap-bg);
	color: var(--ap-grey);
	font-size: .74rem;
	font-weight: 600;
	padding: 2px 9px;
	border-radius: 999px;
	margin-bottom: 6px;
}
.ap-dir-body p { margin: 4px 0; font-size: .9rem; }
.ap-dir-count { color: var(--ap-blue); font-size: .8rem; font-weight: 600; }

/* Single company profile */
.ap-profile { max-width: 760px; margin: 0 auto; }
.ap-profile-head { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.ap-profile-logo { flex: 0 0 88px; width: 88px; height: 88px; }
.ap-profile-headtext h2 { margin: 0 0 6px; color: var(--ap-navy); }
.ap-profile-tagline { margin: 6px 0 0; color: var(--ap-grey); font-size: 1.02rem; }

/* Product grid on a profile */
.ap-prod-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
	margin-top: 10px;
}
.ap-prod-card {
	border: 1px solid var(--ap-line);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	display: flex; flex-direction: column;
}
.ap-prod-img { height: 140px; background: var(--ap-bg); }
.ap-prod-img img { width: 100%; height: 100%; object-fit: cover; }
.ap-prod-body { padding: 12px 14px; }
.ap-prod-body h4 { margin: 0 0 4px; color: var(--ap-navy); font-size: 1rem; }
.ap-prod-price { color: var(--ap-blue); font-weight: 700; font-size: .92rem; }
.ap-prod-body p { margin: 6px 0 0; font-size: .88rem; color: #374151; }

@media (max-width: 600px) {
	.ap-logo-row { flex-direction: column; align-items: flex-start; }
	.ap-profile-head { flex-direction: column; text-align: center; align-items: center; }
}
