/******************************************************************************
#                Manisa TSO Meclis Dosya Sistemi
#******************************************************************************
#  Redesigned stylesheet: institutional navy + gold palette, responsive
#  down to mobile. Structure of the underlying HTML (table-based layouts,
#  jQuery UI accordion, SWFUpload widgets) is unchanged -- only visual
#  styling and responsive behaviour live here.
#*******************************************************************************/

:root {
	--navy-900:#0B2440;
	--navy-800:#123A63;
	--navy-700:#1B4E82;
	--navy-600:#2563A6;
	--navy-050:#EAF1F8;

	--gold-600:#A97817;
	--gold-500:#C9932C;
	--gold-300:#E6C878;

	--bg:#F2F4F8;
	--surface:#FFFFFF;
	--border:#E1E5EC;
	--text:#1E2733;
	--text-muted:#5C6773;

	--success-bg:#E6F5EA;
	--success-text:#1F7A43;
	--danger-bg:#FBEAE9;
	--danger-text:#B3261E;

	--radius-sm:6px;
	--radius-md:10px;
	--radius-lg:14px;

	--shadow-sm:0 1px 2px rgba(15,35,64,.06), 0 1px 1px rgba(15,35,64,.04);
	--shadow-md:0 6px 16px rgba(15,35,64,.10), 0 2px 4px rgba(15,35,64,.06);

	--font-body:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
	--font-display:Georgia,"Times New Roman",serif;
}

* { box-sizing:border-box; }

html { -webkit-text-size-adjust:100%; }

body {
	margin:0;
	font-family:var(--font-body);
	font-size:15px;
	line-height:1.55;
	color:var(--text);
	background:var(--bg);
}

a { color:var(--navy-700); }
a:hover { color:var(--navy-600); }

img { max-width:100%; }

#content {
	padding:24px 20px 48px;
	width:100%;
	max-width:1120px;
	margin:0 auto;
}

/* ---------- Page title ---------- */

#content > h1,
h1.index_h1 {
	font-family:var(--font-display);
	font-weight:700;
	font-size:28px;
	color:var(--navy-900);
	letter-spacing:.2px;
	margin:0 0 20px;
	padding-bottom:14px;
	border-bottom:3px solid var(--gold-500);
	text-align:center;
}

h1.index_h1 { text-align:center; border-bottom:none; padding-bottom:0; }

h2 {
	font-family:var(--font-body);
	font-size:16px;
	font-weight:700;
	letter-spacing:.6px;
	color:var(--navy-800);
	margin:0 0 16px;
	padding-left:12px;
	border-left:4px solid var(--gold-500);
}

h3 { color:var(--navy-800); }

/* ---------- Login / registration / password reset card ---------- */

.login_container {
	padding:32px 30px;
	border:1px solid var(--border);
	background:var(--surface);
	width:100%;
	max-width:440px;
	margin:40px auto;
	border-radius:var(--radius-lg);
	box-shadow:var(--shadow-md);
}
.login {
	padding:0 0 0 76px;
	background:url(../images/key_64.png) no-repeat left center;
	background-size:56px 56px;
	line-height:220%;
}
.login_container input[type="text"],
.login_container input[type="password"] {
	width:100%;
	max-width:260px;
}
.login_container a { font-weight:600; }
.login-submit-row {
	text-align:center;
	margin-top:22px;
	margin-left:-76px;
}
.login-submit-row input[type="submit"] {
	padding:10px 32px;
}

/* ---------- Top navigation menu ---------- */

div.menu {
	display:flex;
	flex-wrap:wrap;
	justify-content:center;
	gap:10px;
	text-align:center;
	background:linear-gradient(180deg,var(--navy-800),var(--navy-900));
	border:none;
	border-bottom:3px solid var(--gold-500);
	border-radius:var(--radius-lg);
	padding:16px 14px;
	margin-bottom:26px;
	box-shadow:var(--shadow-md);
}

div.menu .item {
	text-align:center;
	width:104px;
	margin:0;
}

div.menu .item a {
	display:flex;
	flex-direction:column;
	align-items:center;
	gap:6px;
	text-decoration:none;
	color:#EAF1F8;
	font-size:12.5px;
	font-weight:600;
	padding:10px 6px;
	border-radius:var(--radius-md);
	transition:background .15s ease, transform .15s ease;
}
div.menu .item a:hover {
	background:rgba(255,255,255,.10);
	transform:translateY(-2px);
	color:#fff;
}
div.menu .item a img { filter:brightness(0) invert(1) opacity(.92); width:34px; height:34px; }

.left { float:left; }
.right { float:right; }

/* ---------- Content blocks (cards) ---------- */

.content_block {
	background:var(--surface);
	border:1px solid var(--border);
	border-radius:var(--radius-lg);
	padding:22px 24px;
	margin:0 0 22px;
	box-shadow:var(--shadow-sm);
	overflow-x:auto;
}

/* ---------- Tables ---------- */

table { width:100% !important; border-collapse:collapse; }
td, th { padding:8px 10px; }

.topRow, table tr.topRow td {
	background:var(--navy-800);
	color:#fff;
	font-size:11.5px;
	letter-spacing:.4px;
	font-weight:600;
}
.topRow td:first-child { border-top-left-radius:var(--radius-sm); }
.topRow td:last-child { border-top-right-radius:var(--radius-sm); }

.odd, table tr.odd td { background:var(--navy-050); font-size:13px; }
.even, table tr.even td { background:var(--surface); font-size:13px; }
.odd td, .even td { border-bottom:1px solid var(--border); }

.paging { padding:10px 4px; }
.paging a {
	display:inline-block;
	color:var(--navy-700);
	padding:4px 9px;
	border-radius:var(--radius-sm);
	text-decoration:none;
	font-weight:600;
}
.paging a:hover { background:var(--navy-050); }

.extensions_text { font-size:11px; color:var(--text-muted); }

/* ---------- Forms ---------- */

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
	font-family:var(--font-body);
	font-size:14px;
	color:var(--text);
	padding:8px 11px;
	border:1px solid var(--border);
	border-radius:var(--radius-sm);
	background:var(--surface);
	transition:border-color .15s ease, box-shadow .15s ease;
	max-width:100%;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
	outline:none;
	border-color:var(--navy-600);
	box-shadow:0 0 0 3px var(--navy-050);
}

input[type="submit"],
input[type="button"],
input[name="create"] {
	font-family:var(--font-body);
	font-size:13.5px;
	font-weight:700;
	letter-spacing:.2px;
	color:#fff;
	background:var(--navy-700);
	border:none;
	padding:10px 20px;
	border-radius:var(--radius-sm);
	cursor:pointer;
	transition:background .15s ease, transform .1s ease;
}
input[type="submit"]:hover,
input[type="button"]:hover { background:var(--navy-600); }
input[type="submit"]:active,
input[type="button"]:active { transform:translateY(1px); }

input[type="checkbox"],
input[type="radio"] { width:16px; height:16px; accent-color:var(--navy-700); vertical-align:middle; }

strong { color:var(--navy-800); }

/* ---------- Edit (pencil) action icon - make it read as a clear button ---------- */
img[src*="pencil_16"] {
	width:20px;
	height:20px;
	padding:7px;
	background:var(--navy-050);
	border:1px solid var(--navy-600);
	border-radius:50%;
	box-shadow:var(--shadow-sm);
	transition:background .15s ease, transform .15s ease, box-shadow .15s ease;
}
a:hover > img[src*="pencil_16"] {
	background:var(--gold-500);
	border-color:var(--gold-600);
	transform:scale(1.12);
	box-shadow:var(--shadow-md);
}

/* ---------- Modern drag-and-drop uploader (upload_step2.php) ---------- */

.upload-dropzone {
	border:2px dashed var(--navy-600);
	border-radius:var(--radius-md);
	background:var(--navy-050);
	padding:34px 20px;
	text-align:center;
	cursor:pointer;
	margin:14px 0 10px;
	transition:background .15s ease, border-color .15s ease;
}
.upload-dropzone img { width:40px; height:40px; opacity:.7; margin-bottom:8px; }
.upload-dropzone p { margin:0; color:var(--text-muted); font-size:14px; }
.upload-dropzone strong { color:var(--navy-800); }
.upload-dropzone:hover, .upload-dropzone.drag-over {
	background:#DCEAF7;
	border-color:var(--gold-500);
}

.upload-status-summary {
	font-size:13px;
	font-weight:600;
	color:var(--navy-800);
	margin:6px 0 12px;
}

.upload-queue { display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }

.upload-row {
	border:1px solid var(--border);
	border-radius:var(--radius-sm);
	padding:10px 12px;
	background:var(--surface);
}
.upload-row.uploading { border-color:var(--navy-600); }
.upload-row.upload-success { border-color:var(--success-text); background:var(--success-bg); }
.upload-row.upload-error { border-color:var(--danger-text); background:var(--danger-bg); }

.upload-row-top {
	display:flex;
	justify-content:space-between;
	gap:10px;
	font-size:13px;
	font-weight:600;
	color:var(--text);
	margin-bottom:6px;
}
.upload-filename { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.upload-filesize { flex-shrink:0; color:var(--text-muted); font-weight:400; }

.upload-progress-track {
	height:8px;
	background:var(--navy-050);
	border-radius:5px;
	overflow:hidden;
}
.upload-progress-fill {
	height:100%;
	width:0%;
	background:var(--navy-600);
	transition:width .15s ease;
}
.upload-row.upload-success .upload-progress-fill { background:var(--success-text); }
.upload-row.upload-error .upload-progress-fill { background:var(--danger-text); }

.upload-status { font-size:12px; color:var(--text-muted); margin-top:5px; }
.upload-row.upload-success .upload-status { color:var(--success-text); }
.upload-row.upload-error .upload-status { color:var(--danger-text); }

/* ---------- File messages / comments ---------- */

#blogComments {}
#blogComments .commentWrap { margin:14px 0; }
#blogComments .commentAuthor img { float:left; border-radius:50%; }
#blogComments .commentAuthor ul { margin-left:10px; padding-top:10px; float:left; list-style:none; }
#blogComments .commentAuthor ul li { margin:0; padding:0; }
#blogComments .commentAuthor ul li.siteLink a {
	color:var(--navy-800);
	font-size:12px;
	font-weight:700;
	text-decoration:none;
}
.commentWrap { position:relative; }
#blogComments .commentEntry {
	margin:14px 0 0;
	padding:12px 16px;
	background:var(--navy-050);
	border:1px solid var(--border);
	border-radius:var(--radius-md);
	clear:both;
}

/* ---------- Folder / subfolder accordion (files.php) ---------- */

ul.menu, ul.menu ul {
	list-style-type:none;
	margin:0;
	padding:0;
	width:100%;
	text-align:left;
	border-bottom:0 !important;
}

ul.menu table { font-size:12px; }

ul.menu a { display:block; text-decoration:none; }

ul.menu li a, ul.menu ul.menu li a {
	font-family:var(--font-body);
	font-size:13.5px;
	font-weight:600;
	border:1px solid var(--border);
	color:var(--navy-800);
	background:var(--navy-050);
	cursor:pointer;
	position:relative;
	margin-top:4px;
	display:block;
	padding:.6em .6em .6em .8em;
	border-radius:var(--radius-sm);
	outline:none;
}

ul.menu li a:hover, ul.menu ul.menu li a:hover {
	border-color:var(--navy-600);
	color:var(--navy-900);
	background:#DCEAF7;
	outline:none;
}

ul.menu li ul li a, ul.menu ul.menu li ul li a {
	background:#F5F1E4;
	color:var(--text);
	padding-left:20px;
}

ul.menu li ul li a:hover, ul.menu ul.menu li ul li a:hover {
	background:var(--gold-300);
	border-left:5px solid var(--gold-600);
	padding-left:15px;
}
ul.menu ul.menu li a:hover { border-left:0; padding-left:.5em; }
ul.menu ul.menu { border-left:5px solid var(--gold-500); }

ul.menu a.active, ul.menu ul.menu li a.active,
ul.menu a.active:hover, ul.menu ul.menu li a.active:hover {
	text-decoration:none;
	border:1px solid var(--gold-500);
	background:#FBF3E2;
	font-weight:700;
	color:var(--navy-900);
	border-bottom:0 !important;
	outline:none;
}

div.panel {
	border:1px solid var(--border);
	padding:8px;
	margin-top:-2px !important;
	border-top:none;
	border-bottom-left-radius:var(--radius-sm);
	border-bottom-right-radius:var(--radius-sm);
}

ul.menu div.panel a, ul.menu div.panel li a:hover {
	display:inline;
	color:var(--text-muted);
	background:none;
	margin:0;
	padding:0;
	border:none;
	font-weight:700;
}
ul.menu div.panel a:hover { color:var(--navy-800); text-decoration:underline; }

/* jQuery UI accordion (files.php #accordion) - restyle to match palette.
   filemanager.css is loaded after the jQuery UI theme on that page, so
   these rules take priority without needing !important. */
#accordion { border:none !important; background:none !important; }
#accordion .ui-accordion-header,
#accordion h3.ui-state-default {
	background:var(--navy-800) !important;
	background-image:none !important;
	border:none !important;
	color:#fff !important;
	border-radius:var(--radius-sm) !important;
	margin-top:8px !important;
	font-weight:600;
}
#accordion .ui-accordion-header a { color:#fff !important; }
#accordion .ui-accordion-header.ui-state-active,
#accordion h3.ui-state-active {
	background:var(--gold-600) !important;
	background-image:none !important;
}
#accordion .ui-accordion-content {
	border:1px solid var(--border) !important;
	background:var(--surface) !important;
	border-radius:0 0 var(--radius-sm) var(--radius-sm) !important;
}

/* ---------- Responsive breakpoints ---------- */

@media (max-width:900px) {
	#content { padding:18px 14px 40px; }
	.content_block { padding:18px; }
}

@media (max-width:720px) {
	#content > h1, h1.index_h1 { font-size:22px; }
	div.menu { gap:6px; padding:12px 10px; }
	div.menu .item { width:80px; }
	div.menu .item a { font-size:11px; padding:8px 4px; }
	div.menu .item a img { width:28px; height:28px; }

	/* Let wide data tables scroll horizontally instead of overflowing
	   the page or squeezing columns unreadably. The scrollbar is styled
	   to be clearly visible (not the default hairline) so it's obvious
	   there are more columns - e.g. the edit icon - to the right. */
	table {
		display:block;
		overflow-x:auto;
		-webkit-overflow-scrolling:touch;
		white-space:nowrap;
		scrollbar-width:auto;
		scrollbar-color:var(--gold-500) var(--navy-050);
		border:1px solid var(--border);
		border-radius:var(--radius-sm);
	}
	table::-webkit-scrollbar { height:12px; }
	table::-webkit-scrollbar-track { background:var(--navy-050); }
	table::-webkit-scrollbar-thumb { background:var(--gold-500); border-radius:6px; border:2px solid var(--navy-050); }
	table table { display:table; white-space:normal; border:none; } /* nested layout tables (e.g. inside cells) stay intact */
	td, th { padding:7px 8px; }

	/* Keep the leading checkbox column and trailing action/edit column
	   visible at all times, even mid-scroll, so controls are never
	   accidentally hidden off-screen. */
	table td:first-child, table th:first-child,
	table td:last-child, table th:last-child {
		position:sticky;
		z-index:1;
	}
	table td:first-child, table th:first-child { left:0; }
	table td:last-child, table th:last-child { right:0; }
	table tr.odd td:first-child, table tr.odd td:last-child { background:var(--navy-050); }
	table tr.even td:first-child, table tr.even td:last-child { background:var(--surface); }
	table tr.topRow td:first-child, table tr.topRow td:last-child,
	.topRow td:first-child, .topRow td:last-child { background:var(--navy-800); }
}

@media (max-width:480px) {
	body { font-size:14px; }
	.content_block { padding:14px; border-radius:var(--radius-md); }
	.login_container { padding:24px 18px; margin:20px auto; }
	.login { padding-left:0; background:none; }
	.login-submit-row { margin-left:0; }
	input[type="submit"], input[type="button"] { width:100%; }
}
