/* GENERAL SPECIFICATIONS */
html { 
	box-sizing: border-box;
}

* { 
	margin:0; 
	font: 14px arial, helvetica, sans-serif;
	border-collapse:collapse;
}

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

body {
	background-color:#e0e4cc;
}

/* HYPERLINK ANCHORS */
a {
	text-decoration: none; 
	color: #000;
}
a:hover {
	color:#69d2e7;
	font-weight:bold; 
}

/* INPUT FIELDS */
* input[type=text], * input[type=number], * input[type=password], * select {
	width:160px;
	height:24px;
  border: 1px solid #6e6e6e;
  transition: box-shadow 0.3s, border 0.3s;
}
* input[type="text"]:focus, * input[type=number]:focus, * input[type=password]:focus, * select:focus {
	border: 1px solid #2e2e2e;
  box-shadow: 0 0 5px 1px #6e6e6e;
}
* input[type=submit], input[type=button]{
	padding:3px 9px; 
  background:#6e6e6e; 
  color:#fff;
	border:0 none;
  cursor:pointer;
  border-radius: 3px;
	min-width:6em;
}
* input[type=submit]:hover, input[type=button]:hover{
	background-color:#f38630;
}

* input[type=submit]:active, input[type=button]:active{
	background-color:#2e2e2e;
}

* input[type="file"] {
    display: none;
}
.file-upload {
	display: inline-block;
  margin-bottom:2em;
	padding:3px 9px; 
  background:#6e6e6e; 
  color:#fff;
	border:0 none;
  cursor:pointer;
  border: 1px solid #6e6e6e;
  border-radius: 3px;
	min-width:12.3em;
}
.file-upload:hover{
	background-color:#f38630;
	border: 1px solid #f38630;
}

/* MENU: Header */
#menu_header {
	line-height:90px; 
	margin-bottom:-1.75em;
}

/* MENU: Tabs */
#menu_tabs ul {
	list-style: none;
	padding: 0;
	margin: 0 0 0 1em;
}
#menu_tabs li {
	float: left;
	border-bottom-width: 0;
	margin: 0 2em 0 0;
}
#menu_tabs a {
	text-decoration: none;
	/*font-weight: bold;*/
	display: block;
	background-color: #6e6e6e;
	padding: .5em .5em;
	color:#fff;
	width: 8.4em;
	text-align: center;
}
#menu_tabs a:hover {
	background-color: #f38630;
	font-weight:normal;
}
#menu_tabs #tab_selected {
	background-color: #2e2e2e;
}
#menu_tabs #tab_selected a {
	color: #fa6900;
	font-weight: bold;
	background-color: #2e2e2e;
}

/* MENU: Logout Button */
#menu_logout {
	float:right;
	width:8em;
	margin:0;
	padding:.5em;
	background-color:#f38630;
	color:#fff;
}
#menu_logout a {
	color:#fff;
}
#menu_logout ul {
	margin:0;
	padding:0;
	list-style:none;
	text-align:center;
}
#menu_logout ul li ul {
	margin-top:1em;
	display:none;
}
#menu_logout ul li:hover ul {
	display:block;
}
#menu_logout ul li ul li {
	margin-top:.5em;
}

/* MENU: Main Part */
#menu_main {
	height:3em;
	clear: both;
	padding: .2em 1em;
	line-height:2.75em;
	vertical-align:middle;
	background-color: #2e2e2e;
	margin-bottom: 2.5em;
}
#menu_main a {
	display:inline;
	margin: 0;
	padding: .2em 1em;
	border-right: 1px dashed white;
	font-size:1.1em;
	font-weight:bold;
	text-decoration:none;
	color: #fff;
}
#menu_main a:last-child {
	border:0;
}
#menu_main a:hover {
	color:#fff;
	background-color:#a7dbd8;
}
#menu_main #item_selected {
	color: #69d2e7;
}
#menu_main #item_selected:hover {
	color: #fff;
}

/* MENU: Selection Bar */
#menu_selection{
	width:100%;
	height:3em;
	margin-top: -2.5em;
	margin-bottom: 2em;
	padding: 0.5em;
	text-align:center;
	background-color:#a7dbd8;
}

/* CONTENT DIVs */
.content_center {
	width:75%; 
	margin:auto; 
	text-align:center;
}
.content_left {
	width:40%;
	margin: auto;
	float:left; 
	text-align:center;
}
.content_right {
	width:60%; 
	margin:auto;
	float:right; 
	text-align:center;
	border-left: 1px white dashed;
}
.content_settings {
	width:40%;
	margin:auto;
}
.content_settings p {
	text-align:left;
	margin-bottom:0.1em;
}
.content_settings input[type=submit]{
	margin-top:.8em;
}
#content_hidden {
	background:#a7dbd8; 
	padding:3%;
	margin-top:1em;
	margin-bottom:2em;
	display:none;
}

/* STANDARD TABLE */
#tb_table {
	width:90%;
	margin:auto;
	margin-bottom:3em;
}
#tb_table td, #tb_table th  {
	padding:3px;
	text-align:center;
	border:1px solid #2e2e2e;
	background-color: #e0e4cc;
}
#tb_table th {
	padding-top:1px;
	padding-bottom:1px;
	line-height:20px;
	font-weight:bold;
	background-color:#f38630;
	color:#fff;
}

#tb_table th.title, #tb_table th.title a {
	font-size:15px;
	font-weight:bold;
	line-height:30px;
	background-color:#2e2e2e; 
	color:#fff;
}

#tb_table tr:nth-child(even) td {
	background-color:#fff;
}
#tb_table  tr.balance td {
	background-color:#a7dbd8;
	font-weight:bold;
}

/* TABLE FOR INPUT FIELDS */
#tb_fields{
	width:95%;
	margin:auto;
	margin-bottom:1em;
	border-collapse:separate;
	border-spacing: 1em 1.25em;
}
#tb_fields td, #tb_fields th {
	text-align:left;
}
#tb_fields td.center {
	text-align:center;
	padding-top:3%;
}

/* TABLE FOR SETTINGS */
#tb_set{
	width:90%;
	border-collapse:separate;
	border-spacing: 2em .75em;
	color:#2e2e2e;
	/* background:#a7dbd8; */
}
#tb_set span{
	/* font-weight:bold; */
}

/* TEXT-FORMATTING */
.heading, .heading_narrow {
	margin-left:auto;
	margin-right:auto;
	margin-bottom:1.5em;
	text-align:center;
	font-weight:bold;
	font-size:1.5em;
	color:#fa6900;	
}
.heading_narrow {
	margin-bottom: .5em;
}
.warn {
	font-weight:bold;
	color:red;
}
.export {
	margin-bottom:2em;
	text-align:center;
}
.alert{
	padding: 8px 35px 8px 14px;
	width:50%;
	margin: 3em auto;
	/*text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);*/
	text-shadow: 1px 1px 0 #fff;
	color: #000;
  background-color: #e0e4cc;
  border: 2px solid #fa6900;
	border-radius: 4px;
}

.content_center h1 {
	margin-top:1.5em;
	font-size:1.1em;
}
.content_center p, .content_center a {
	margin-top:.25em;
	font-weight:bold;
	color:#fa6900;
}

.dashboard_cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

.card {
	background: white;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	text-align: center;
	transition: transform 0.2s;
}

.card:hover {
	transform: translateY(-2px);
}

.card h3 {
	color: #2e2e2e;
	margin-bottom: 10px;
	font-size: 1.1em;
}

.card .balance {
	font-size: 1.8em;
	font-weight: bold;
	color: #69d2e7;
	margin: 10px 0;
}

.card .subtext {
	color: #6e6e6e;
	font-size: 0.9em;
}

.card_link {
	display: inline-block;
	margin-top: 10px;
	padding: 8px 16px;
	background: #69d2e7;
	color: white;
	text-decoration: none;
	border-radius: 4px;
	transition: background 0.2s;
}

.card_link:hover {
	background: #5aa9b9;
}

.account_summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

.summary_card {
	background: white;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	text-align: center;
}

.summary_card h3 {
	color: #2e2e2e;
	margin-bottom: 10px;
}

.summary_card .balance {
	font-size: 1.5em;
	font-weight: bold;
	color: #69d2e7;
}

.loan_card {
	background: white;
	margin-bottom: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	overflow: hidden;
}

.loan_header {
	background: #f8f9fa;
	padding: 15px 20px;
	border-bottom: 1px solid #e9ecef;
}

.loan_header h3 {
	margin: 0;
	color: #2e2e2e;
}

.loan_date {
	color: #6e6e6e;
	font-size: 0.9em;
	margin: 5px 0 0 0;
}

.loan_details {
	padding: 20px;
}

.detail_item {
	display: flex;
	justify-content: space-between;
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid #f8f9fa;
}

.detail_item:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.detail_item .label {
	font-weight: bold;
	color: #2e2e2e;
}

.detail_item .value {
	color: #69d2e7;
	font-weight: bold;
}

.loan_payments {
	background: #f8f9fa;
	padding: 20px;
	margin-top: 10px;
}

.loan_payments h4 {
	margin: 0 0 15px 0;
	color: #2e2e2e;
}

.payment_grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 15px;
}

.payment_item {
	text-align: center;
}

.payment_item .label {
	display: block;
	font-size: 0.9em;
	color: #6e6e6e;
	margin-bottom: 5px;
}

.payment_item .value {
	font-weight: bold;
	color: #2e2e2e;
}

.profile_container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
}

.profile_info, .profile_form {
	background: white;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.profile_table {
	width: 100%;
}

.profile_table td {
	padding: 8px 0;
}

.profile_table td:first-child {
	font-weight: bold;
	width: 150px;
}

.form_table {
	width: 100%;
}

.form_table td {
	padding: 10px 5px;
}

.form_table input[type="text"],
.form_table input[type="email"],
.form_table textarea {
	width: 100%;
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.form_table textarea {
	height: 80px;
	resize: vertical;
}

.form_table input[type="submit"] {
	width: 100%;
	padding: 12px;
	background: #69d2e7;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	cursor: pointer;
}

.form_table input[type="submit"]:hover {
	background: #5aa9b9;
}

.no_data {
	text-align: center;
	color: #6e6e6e;
	font-style: italic;
	padding: 40px;
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.positive {
	color: #28a745;
}

.negative {
	color: #dc3545;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
	/* General Mobile Styles */
	* {
		font-size: 16px; /* Prevent zoom on iOS */
	}
	
	body {
		padding: 0;
		margin: 0;
	}
	
	/* Header adjustments */
	#menu_header {
		text-align: center;
		line-height: 60px;
		margin-bottom: 0;
		padding: 10px 0;
	}
	
	#menu_header img {
		max-width: 80%;
		height: auto;
	}
	
	/* Tab navigation - hide on mobile, show toggle */
	#menu_tabs {
		display: none;
	}
	
	.mobile-menu-toggle {
		display: block;
		background: #2e2e2e;
		color: white;
		border: none;
		padding: 10px;
		cursor: pointer;
		font-size: 18px;
		width: 100%;
		text-align: left;
	}
	
	.mobile-menu-toggle i {
		margin-right: 10px;
	}
	
	/* Main menu - make it collapsible */
	#menu_main {
		display: none;
		flex-direction: column;
		height: auto;
		padding: 0;
		margin-bottom: 1em;
	}
	
	#menu_main.show {
		display: flex;
	}
	
	#menu_main a {
		display: block;
		border-right: none;
		border-bottom: 1px solid #444;
		padding: 15px;
		text-align: center;
		font-size: 16px;
		min-height: 48px; /* Touch target */
	}
	
	#menu_main a:last-child {
		border-bottom: none;
	}
	
	/* Content layout */
	.content_center {
		width: 100% !important;
		margin: 0;
		padding: 10px;
	}
	
	.content_left,
	.content_right {
		width: 100% !important;
		float: none !important;
		margin: 0;
		padding: 15px;
		border: none !important;
		text-align: left !important;
	}
	
	.content_right {
		border-top: 1px solid #ddd !important;
		margin-top: 20px;
	}
	
	/* Form elements */
	input[type="text"],
	input[type="number"],
	input[type="password"],
	select {
		width: 100% !important;
		max-width: none !important;
		font-size: 16px;
		padding: 12px 8px;
		margin-bottom: 10px;
	}
	
	input[type="submit"],
	input[type="button"] {
		width: 100% !important;
		padding: 15px;
		font-size: 16px;
		min-height: 48px; /* Touch target */
		margin: 10px 0;
	}
	
	/* Tables - make scrollable */
	.table {
		font-size: 14px;
		overflow-x: auto;
		display: block;
		white-space: nowrap;
	}
	
	.table th,
	.table td {
		padding: 8px 4px;
		min-width: 80px;
	}
	
	/* Form tables - stack on mobile */
	.form_table {
		width: 100%;
	}
	
	.form_table tr {
		display: block;
		margin-bottom: 15px;
	}
	
	.form_table td {
		display: block;
		width: 100% !important;
		padding: 5px 0;
		text-align: left;
	}
	
	.form_table td:first-child {
		font-weight: bold;
		margin-bottom: 5px;
	}
	
	.form_table input[type="text"],
	.form_table input[type="email"],
	.form_table input[type="password"],
	.form_table textarea,
	.form_table select {
		width: 100% !important;
		padding: 12px 8px;
		font-size: 16px;
		margin-bottom: 10px;
	}
	
	.form_table textarea {
		height: 80px;
		resize: vertical;
	}
	
	.form_table input[type="submit"] {
		width: 100% !important;
		padding: 15px;
		font-size: 16px;
		min-height: 48px;
		margin: 10px 0;
	}
	
	/* Settings page */
	.content_settings {
		width: 100% !important;
	}
	
	/* Dashboard cards */
	.dashboard_cards,
	.account_summary {
		grid-template-columns: 1fr !important;
		gap: 15px;
	}
	
	.summary_card {
		min-width: auto !important;
		padding: 20px 15px;
	}
	
	/* Profile container */
	.profile_container {
		grid-template-columns: 1fr !important;
	}
	
	/* Loan cards */
	.loan_card {
		margin-bottom: 20px;
		padding: 15px;
	}
	
	/* Hide logout dropdown on mobile, make it a simple link */
	#menu_logout ul li ul {
		display: none !important;
	}
	
	#menu_logout {
		position: absolute;
		top: 10px;
		right: 10px;
		width: auto;
		background: transparent;
		padding: 0;
	}
	
	#menu_logout a {
		color: #333;
		font-size: 14px;
	}
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
	.content_center {
		width: 90%;
	}
	
	.content_left {
		width: 45%;
	}
	
	.content_right {
		width: 55%;
	}
	
	.account_summary {
		grid-template-columns: repeat(2, 1fr);
	}
} / *   L a r g e   s c r e e n s   * / 
 @ m e d i a   ( m i n - w i d t h :   1 0 2 5 p x )   { 
         . c o n t e n t _ c e n t e r   { 
                 w i d t h :   8 5 % ; 
                 m a x - w i d t h :   1 2 0 0 p x ; 
         } 
 } 
 
 
 / *   A D D I T I O N A L   B E A U T I F I C A T I O N   A N D   U X   I M P R O V E M E N T S   * / 
 
 / *   M o d e r n   B u t t o n   S t y l i n g   * / 
 . m o b i l e - m e n u - t o g g l e ,   . c u s t - m o b i l e - m e n u - t o g g l e   { 
         t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
         b o r d e r - r a d i u s :   6 p x ; 
         f o n t - w e i g h t :   b o l d ; 
         b o x - s h a d o w :   0   2 p x   4 p x   r g b a ( 0 , 0 , 0 , 0 . 1 ) ; 
 } 
 
 . m o b i l e - m e n u - t o g g l e : h o v e r ,   . c u s t - m o b i l e - m e n u - t o g g l e : h o v e r   { 
         t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
         b o x - s h a d o w :   0   4 p x   8 p x   r g b a ( 0 , 0 , 0 , 0 . 1 5 ) ; 
 } 
 
 / *   E n h a n c e d   C a r d   S t y l i n g   * / 
 . s u m m a r y _ c a r d ,   . l o a n _ c a r d   { 
         t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
         b o r d e r - r a d i u s :   1 0 p x ; 
 } 
 
 . s u m m a r y _ c a r d : h o v e r ,   . l o a n _ c a r d : h o v e r   { 
         t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
         b o x - s h a d o w :   0   6 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 1 5 ) ; 
 } 
 
 / *   B e t t e r   F o r m   S t y l i n g   * / 
 i n p u t [ t y p e = " t e x t " ] ,   i n p u t [ t y p e = " n u m b e r " ] ,   i n p u t [ t y p e = " p a s s w o r d " ] ,   s e l e c t ,   t e x t a r e a   { 
         b o r d e r - r a d i u s :   6 p x ; 
         t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 } 
 
 i n p u t [ t y p e = " t e x t " ] : f o c u s ,   i n p u t [ t y p e = " n u m b e r " ] : f o c u s ,   i n p u t [ t y p e = " p a s s w o r d " ] : f o c u s ,   s e l e c t : f o c u s ,   t e x t a r e a : f o c u s   { 
         t r a n s f o r m :   s c a l e ( 1 . 0 2 ) ; 
 } 
 
 / *   I m p r o v e d   T a b l e   H o v e r   E f f e c t s   * / 
 . t a b l e   t b o d y   t r   { 
         t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 } 
 
 . t a b l e   t b o d y   t r : h o v e r   { 
         t r a n s f o r m :   s c a l e ( 1 . 0 1 ) ; 
 } 
 
 / *   L o a d i n g   A n i m a t i o n   f o r   B e t t e r   U X   * / 
 @ k e y f r a m e s   f a d e I n   { 
         f r o m   {   o p a c i t y :   0 ;   t r a n s f o r m :   t r a n s l a t e Y ( 2 0 p x ) ;   } 
         t o   {   o p a c i t y :   1 ;   t r a n s f o r m :   t r a n s l a t e Y ( 0 ) ;   } 
 } 
 
 . s u m m a r y _ c a r d ,   . l o a n _ c a r d ,   . t a b l e   { 
         a n i m a t i o n :   f a d e I n   0 . 5 s   e a s e - o u t ; 
 } 
 
 / *   B e t t e r   T y p o g r a p h y   * / 
 b o d y   { 
         f o n t - f a m i l y :   - a p p l e - s y s t e m ,   B l i n k M a c S y s t e m F o n t ,   " S e g o e   U I " ,   R o b o t o ,   " H e l v e t i c a   N e u e " ,   A r i a l ,   s a n s - s e r i f ; 
         l i n e - h e i g h t :   1 . 6 ; 
 } 
 
 h 1 ,   h 2 ,   h 3   { 
         f o n t - w e i g h t :   6 0 0 ; 
         c o l o r :   # 2 c 3 e 5 0 ; 
 } 
 
 h 1   { 
         f o n t - s i z e :   2 . 2 e m ; 
         m a r g i n - b o t t o m :   0 . 5 e m ; 
 } 
 
 h 2   { 
         f o n t - s i z e :   1 . 8 e m ; 
         m a r g i n - b o t t o m :   0 . 5 e m ; 
 } 
 
 h 3   { 
         f o n t - s i z e :   1 . 4 e m ; 
         m a r g i n - b o t t o m :   0 . 3 e m ; 
 } 
 
 / *   E n h a n c e d   C o l o r   S c h e m e   * / 
 . p o s i t i v e   { 
         c o l o r :   # 2 7 a e 6 0   ! i m p o r t a n t ; 
 } 
 
 . n e g a t i v e   { 
         c o l o r :   # e 7 4 c 3 c   ! i m p o r t a n t ; 
 } 
 
 / *   B e t t e r   S p a c i n g   * / 
 . c o n t e n t _ l e f t ,   . c o n t e n t _ r i g h t   { 
         m a r g i n - b o t t o m :   2 e m ; 
 } 
 
 . a c c o u n t _ s u m m a r y   { 
         m a r g i n :   2 e m   0   3 e m   0 ; 
 } 
 
 / *   M o b i l e   O p t i m i z a t i o n s   * / 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
         / *   P r e v e n t   h o r i z o n t a l   s c r o l l   * / 
         b o d y   { 
                 o v e r f l o w - x :   h i d d e n ; 
         } 
         
         / *   B e t t e r   t o u c h   t a r g e t s   * / 
         a ,   b u t t o n ,   i n p u t [ t y p e = " s u b m i t " ] ,   i n p u t [ t y p e = " b u t t o n " ]   { 
                 m i n - h e i g h t :   4 4 p x ; 
                 m i n - w i d t h :   4 4 p x ; 
         } 
         
         / *   I m p r o v e d   r e a d a b i l i t y   * / 
         . t a b l e   t h ,   . t a b l e   t d   { 
                 f o n t - s i z e :   1 3 p x ; 
                 p a d d i n g :   8 p x   6 p x ; 
         } 
         
         / *   B e t t e r   f o r m   s p a c i n g   * / 
         i n p u t [ t y p e = " t e x t " ] ,   i n p u t [ t y p e = " n u m b e r " ] ,   i n p u t [ t y p e = " p a s s w o r d " ] ,   s e l e c t   { 
                 m a r g i n - b o t t o m :   1 5 p x ; 
         } 
         
         / *   E n h a n c e d   v i s u a l   h i e r a r c h y   * / 
         h 1   { 
                 f o n t - s i z e :   1 . 8 e m ; 
         } 
         
         h 2   { 
                 f o n t - s i z e :   1 . 5 e m ; 
         } 
         
         . s u m m a r y _ c a r d   . b a l a n c e   { 
                 f o n t - s i z e :   1 . 6 e m ; 
         } 
 } 
 
 